User guide
Page 152
2-10 Logical Operation Commands
AND (Logical AND)
Chapter 4. Programming
[Function] Stores the results of the AND operation on the contents of the variable in Operand 1 and the data in Operand
2, in the variable in Operand 1. Stores the results of the AND operation on the variable in Operand 1 and the
contents of the variable in Operand 2, in the variable in Operand 1. If there is a post instruction (flag, output
port), it turns ON when the computation result is zero.
[Example] AND 1 3
If the content of variable 1 in Operand 1 is 131 in decimal notation (10000011 in binary notation)
and the data in Operand 2 is 3 in decimal notation (00000011 in binary notation), the result of the
AND operation is 3 in decimal notation (00000011 in binary notation), and variable 1 becomes 3.
Variable 1 (Operand 1) 10000011
Data (Operand 2) 00000011
Result (Store in Variable 1) 00000011 (3 in decimal notation, variable 1 becomes 3)
OR (Logical OR)
Expansion
condition
(AND · OR)
Input
condition
(I/O · Flag)
Command
Post
(Output port · Flag)
Command Operand 1 Operand 2
Optional Optional AND Variable no. Data·Variable no. Optional
Expansion
condition
(AND · OR)
Input
condition
(I/O · Flag)
Command
Post
(Output port · Flag)
Command Operand 1 Operand 2
Optional Optional OR Variable no. Data·Variable no. Optional
AND
[Function] Stores the results of the OR operation on the contents of the variable in Operand 1 and the data in Operand 2,
in the variable in Operand 1. Stores the results of the OR operation on the variable in Operand 1 and the
contents of the variable in Operand 2, in the variable in Operand 1. If there is a post instruction (flag, output
port), it turns ON when the computation result is zero.
[Example] OR 1 3
If the content of variable 1 in Operand 1 is 128 in decimal notation (10000000 in binary notation)
and the data in Operand 2 is 3 in decimal notation (00000011 in binary notation), the result of the OR
operation is 131 in decimal notation (10000011 in binary notation), and variable 1 becomes 131.
Variable 1 (Operand 1) 10000000
Data (Operand 2) 00000011
Result (Store in Variable 1) 10000011 (131 in decimal notation, variable 1 becomes 131)
OR