Local/global variables and flags – IAI America ASEL User Manual
Page 303
![background image](/manuals/350317/303/background.png)
Part 2 Programs
Chapter 10 Example of Building a System
281
Part 2 Programs
13. Local/Global Variables and Flags
Description
The internal variables and flags used in the SEL language are classified into local and global types.
The data range used commonly by all programs is called the global range, while the data range used only
by each program is called the local range. When multi-tasking programs are run simultaneously, the
global range must be used to synchronize the programs and allow cross-referencing of variables among
the programs.
Example of Use
Program handshake
Program A
Program B
Use of global flags with the above two programs permits handshake between the programs, and the
actuator moves per “MOVL 1” in program A, moves per “MOVL 2” in program B, and then move per
“MOVL 3” in program A, for example.
Backup in Battery
If the ASEL controller has a built-in battery (optional), variables and flags used in the programs are
retained. For both variables and flags, only those in the global range will be retained after the controller
power is turned off.
The variables and flags in the local range are cleared when the program is started (the variables are reset
to “0,” while the flags turn OFF).