
141
Part 4 Commands
Chapter 2 Explanation of Commands
1. Commands
1.1 Variable Assignment
LET (Assign)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional Optional LET Variable
number
Data ZR
[Function]
Assign the value specified in operand 2 to the variable specified in operand 1.
The output will turn ON when 0 is assigned to the variable specified in operand 1.
[Example 1]
LET
1
10
Assign 10 to variable 1.
[Example 2]
LET
1
2
Assign 2 to variable 1.
LET
3
10
Assign 10 to variable 3.
LET
*1
*3
Assign the content of variable 3 (10) to the variable
of the content of variable 1 (variable 2).
TRAN (Copy)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional Optional TRAN Variable
number
Variable
number
ZR
[Function]
Assign the content of the variable specified in operand 2 to the variable specified in
operand 1.
The output will turn ON when 0 is assigned to the variable specified in operand 1.
[Example 1]
TRAN
1
2
Assign the content of variable 2 to variable 1.
A LET command of the same effect as the above
operation
LET 1 *2
[Example 2]
LET
1
2
Assign 2 to variable 1.
LET
2
3
Assign 3 to variable 2.
LET
3
4
Assign 4 to variable 3.
LET
4
10
Assign 10 to variable 4.
TRAN
*1
*3
Assign the content of variable 3 (which is variable 4,
or 10) to the variable of the content of variable 1
(variable 2).
The variables change as follows:
1 2 3 4
1 2 3 4
2 3 4 10
2 10
4 10
142
Part 4 Commands
CLR (Clear variable)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional Optional CLR Variable
number
Variable
number
ZR
[Function]
Clear the variables from the one specified in operand 1 through the other specified in
operand 2.
The contents of the variables that have been cleared become 0.
The output will turn ON when 0 is assigned to the variable specified in operand 1.
[Example 1]
CLR
1
5
Clear variables 1 through 5.
[Example 2]
LET
1
10
Assign 10 to variable 1.
LET
2
20
Assign 20 to variable 2.
CLR
*1
*2
Clear the variables from the content of variable 1
(variable 10) through the content of variable 2
(variable 20).
144
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: ......