
117
Part 3 Controller Data Structure
1.4 Flags
Contrary to its common meaning, the term “flag” as used in programming means “memory.” Flags are
used to set or reset data. They correspond to “auxiliary relays” in a sequencer.
Flags are divided into global flags (Nos. 600 to 899) that can be used in all programs, and local flags (Nos.
900 to 999) that can be used only in each program.
Global flags will be retained (backed up by battery) even after the power is turned off.
Local flags will be cleared when the power is turned off.
Flag number
600 ~ 899
Can be used in all programs “Global flags”
Flag number
900 ~ 999
Used only in each program “Local flags”
Program 1
Program n
BTON 600
WTON 600
BTON 900
BTON 900
Turn on flag 600
Wait for flag 600 to turn ON
(Like this, global flags can be
used to exchange signals.)
(Although the number is the
same, these are local flags and
can exist only in their
respective programs.)
118
Part 3 Controller Data Structure
1.5 Variables
(1) Meaning of variable
“Variable” is a technical term used in software programming. Simply put, it means “a box in which a
value is put.” Variables can be used in many ways, such as putting in or taking out a value and
performing addition or subtraction.
Command Operand 1 Operand 2
ADD 1 1
If this command is applied to variable box 1, which already contains 2, then 1 will be added to the
current value and 3 will result.
Variable
box 1
A variable can be used in many ways, such as:
Putting in a value (1234),
Taking out a value (456), or
Adding a value (+1).
Variable
box 1
1 is added.
(Already contains 2)
120
Summary of Contents for X-SEL PX
Page 1: ...Operation ManualSeventh Edition X SEL Controller PX QX Type Tenth Edition ...
Page 2: ......
Page 8: ......
Page 14: ......
Page 410: ...383 Appendix 386 ...
Page 452: ...425 Appendix 5 428 ...
Page 559: ......