Local/global variables and flags – IAI America XSEL-KE User Manual
Page 310
![background image](/manuals/350328/310/background.png)
295
Appendix
13. Local/Global Variables and Flags
Description
Internal variables and flags used in SEL language are divided into local and global types.
Data areas used commonly by all programs are called global areas, while data areas used individually by
each program are called local areas. Global areas must be used if you want to coordinate the timings of
multiple programs in the multi-tasking mode or allow these programs to cross-reference the values of their
variables.
Example of Use
Program handshake
By using global flags as shown above, you can ca
XVHSURJUDP$WRH[HFXWH³029/´FDXVHSURJUDP%
WRH[HFXWH³029/´DIWHUFRPSOHWLRQRIWKHSUior movement, and then cause program A to execute
³029/´DIWHUFRPSOHWLRQRIWKHSULRUPRYHPHQWWKXVHIIHFWLYHO\LPSOHPHQWLQJKDQGVKDNHVEHWZHHQWKH
two programs.
Backup Battery
All X-SEL controllers have a built-in battery to retain the variables and flags used in the program. With
both variables and flags, only those stored in global areas will be retained after the controller power is cut
off. Variables and flags stored in local areas will be cl
HDUHGWR³´IRUYDULDEOHVDQG³2))´IRUIODJVZKHQ
a new program is started.
Program A
Program B