Local/global variables and flags – IAI America XSEL-KET User Manual
Page 323

304
INTELLIGENT ACTUATOR
Appendix
13. Local/Global Variables and Flags
[Description]
Internal variables and flags used in the SEL language are either local or global.
Data areas used commonly by all programs are called “global areas,” while data areas used only by each
individual program are called “local areas.” Global areas must be used if you want to align the timings
between multi-tasking programs or allow multiple programs to reference one another for values of
variables.
[Use example]
Handshake between programs
When global flags are used in the programs as shown above, the actuator moves according to “MOVL 1”
in program A, after which “MOVL 2” in program B is executed to move the actuator, upon completion of
which “MOVL 3” in program A is executed, thereby enabling handshake between the programs.
[Battery backup]
The X-SEL controller has a built-in battery that lets you retain the statuses of variables and flags used in
each program. With both variables and flags, only the statuses of those in global areas are retained after
the controller power is cut off.
The statuses of variables and flags in local areas are cleared (to 0 in the case of variables or turned OFF
in the case of flags) when a program is started.
Program A
Program B