<< Prev        Next >>

ID : 579

Global variable

Global variable refers to a variable held by a project and can be referenced and overwritten from every task in the project.

Data Type, Number, Declaration of Global Variable

Global variables have already been retained in advance, you don't need to create (declare) them in a program.

Data types which have already been set in advance are as follows.

The number is set on each data type. Adjust it on the variable setting screen."Refer to "Display/Setting of the Number of Variables Used."

Data Save

Global variable values are retained even after controller shutdown.

Accessing Global Variable

Value of global variable can be rewritten all kinds of tasks, devices, TP screen operation in a project.

When logging in with Operator level, TP variable editing screen does not allow you to change a value.

Accessing global variable in PacScript is described as follows. To designate a global variable number, put the number between square brackets "[ ]." Expressions can also be designated between "[ ]." For a value, "[ ]" can be omitted.

The following sample descriptions indicate "F[25]."

F25

F0025

F[25]

F[5*5]

I3=5   F[5*I3]

ID : 579

<< Prev        Next >>