ID : 9822
Global Variable
Global Variable refers to a variable that is held by a project and can be referenced and overwritten from any task in a project.
This operation is available only when the currently logged-in account is granted user permission for "Programming".
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 controller shutdown.
Accessing Global Variable
Value of global variable can be rewritten all kinds of tasks, devices, Smart TP screen operation in a project.
Accessing global variable in PacScript is described as follows. To designate a global variable number, put the number between square brackets "[ ]". Both a value and a numerical formula can be put in the brackets. 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 : 9822

