
119
Part 3 Controller Data Structure
Real variable box
Variable
box 1
(2) Types of variables
Variables are classified into two types, as follows:
[1] Integer variables
These variables cannot handle decimal places.
[Example] 1234
Integer variable number
200 ~ 299
1200 ~ 1299
Can be used in all programs
“Global integer variables”
Integer variable number
1 ~ 99
1001 ~ 1099
Used only in each program
“Local integer variables”
Caution
Integer 99 is a special register this system uses in integer operations.
Any value in the range from –9,999,999 to 99,999,999 can be input in
programs.
[2] Real variables
Actual values. These variables can handle decimal places.
[Example] 1234.567
(Decimal point)
Real variable number
300 ~ 399
1300 ~ 1399
Can be used in all programs
“Global real variables”
Real variable number
100 ~ 199
1100 ~ 1199
Used only in each program
“Local real variables”
Caution
Real number 199 is a special register this system uses in real-number
operations. Any value in the range from –99,999.9 to 999,999.9 (eight
digits including a sign) can be input in programs.
Integer variable box
Variable
box 1
120
Part 3 Controller Data Structure
[3] Variables with “*” (asterisk) (indirect specification)
An “*” (asterisk) is used to specify a variable.
In the following example, the content of variable box 1 will be put in variable box 2. If variable
box 1 contains “1234,” then “1234” will be put in variable box 2.
Command
Operand 1
Operand 2
LET 1 1234
Command
Operand 1
Operand 2
LET 2 *1
The above use of variables is called “indirect specification.”
An “*” is also used when indirectly specifying a symbol variable (refer to 1.8, “Symbols”).
Command
Operand 1
Operand 2
LET ABC 1
LET BCD 2
ADD ABC *BCD
Put 1 in variable ABC.
Put 2 in variable BCD.
Add the content of variable BCD, or 2, to
variable ABC
(The content of variable ABC becomes 3).
Variable
box 1
Put in.
Variable
box 1
Variable
box 2
122
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: ......