6
BASIC INSTRUCTIONS
6.1
Comparison Operation Instructions
BIN 16-bit data comparisons
LD, AND, OR
High
Basic
Process
Redundant Universal
performance
LD
AND
OR
(S1), (S2): Data for comparison or head number of the devices where the data for comparison is stored (BIN 16 bits)
Setting
Internal device
data
Bit
Word
(S1)
(S2)
Processing details
• Treats BIN 16-bit data from device designated by (S1) and BIN 16-bit data from device designated by (S2) as a normally-
open contact, and performs comparison operation.
• The results of the comparison operations for the individual instructions are as follows:
Instruction symbol
Condition
=
(S1)=(S2)
<>
(S1)(S2)
>
(S1)>(S2)
<=
(S1)(S2)
<
(S1)<(S2)
>=
(S1)(S2)
• When (S1) and (S2) are assigned by a hexadecimal constant and the numerical value (8 to F) whose most significant bit
(b15) is "1" is designated as a constant, the value is considered as a negative BIN value in comparison operation.
Operation error
• There is no operation error in the LD instruction, AND instruction, or OR instruction.
LCPU
indicates an instruction symbol of
Command
Command
Command
R, ZR
J\
Bit
Word
Comparison
Instruction symbol
operation result
Continuity
=
<>
>
<=
<
>=
/
/
S1
S2
S1
S2
S1
S2
U\G
Zn
Condition
(S1)(S2)
(S1)=(S2)
(S1)(S2)
(S1)>(S2)
(S1)(S2)
(S1)<(S2)
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
/
.
/
/
Constant
Others
K, H
Comparison
operation result
Non-continuity
187
6