ID : 3529
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."
- I type (Integer Type)
- F type (Single Precision Real Number Type)
- D type (Double Precision Real Number Type)
- S type (String Type)
- P type (Position Type)
- J type (Joint Type)
- T type (Homogeneous Translation Type)
- V type (Vector Type)
- I/O type (I/O Type)
Data Save
Global variable values are retained even after COBOTTA 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 : 3529