■Applicable devices
Operand
Bit
X, Y, M, L,
J\
SM, F, B, SB,
FX, FY
(s1)
(s2)
• In safety programs executed by the Safety CPU, only the following safety devices and constants can be used.
Operand
Bit
SA\X, SA\Y, SA\M, SA\SM, SA\B
(s1)
(s2)
Processing details
• These instructions perform a comparison operation between the 32-bit binary data in the device specified by (s1) and the
32-bit binary data in the device specified by (s2). (Devices are used as normally open contacts.)
• The following table lists the comparison operation results of each instruction.
Instruction symbol (ladder, FBD/LD)
D=(_U), EQ(_U)
D<>(_U), NE(_U)
D>(_U), GT(_U)
D<=(_U), LE(_U)
D<(_U), LT(_U)
D>=(_U), GE(_U)
D=(_U), EQ(_U)
D<>(_U), NE(_U)
D>(_U), GT(_U)
D<=(_U), LE(_U)
D<(_U), LT(_U)
D>=(_U), GE(_U)
• When hexadecimal constants are specified for (s1) and (s2) and the numerical value (8 to F) whose most significant bit
(b31) is 1 is specified as a constant, the value is considered as a negative binary value in comparison operation.
• To specify the compare target data, use an instruction which handles 32-bit data, such as the DMOV(P) instruction. If an
instruction which handles 16-bit data, such as the MOV(P) instruction, is used, comparison cannot be performed normally.
• If the LDD instruction is used in the program written in FBD/LD, use a left rail or a variable/constant which is always on for
EN.
• If the ORD instruction is used in the program written in FBD/LD and EN is set to TRUE, ENO turns on. EN will not be an
execution condition.
Operation error
There is no operation error.
Word
T, ST, C, D, W,
U\G, J\,
SD, SW, FD, R,
U3E\(H)G
ZR, RD
Word
SA\T, SA\ST, SA\C, SA\D, SA\W, SA\SD
Condition
(s1)=(s2)
(s1)(s2)
(s1)>(s2)
(s1)(s2)
(s1)<(s2)
(s1)(s2)
(s1)(s2)
(s1)=(s2)
(s1)(s2)
(s1)>(s2)
(s1)(s2)
(s1)<(s2)
Double word Indirect
specification
Z
LT, LST,
LZ
LC
Result
Continuity state (ENO is on.)
Non-continuity state (ENO is off.)
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
Constant
Others
K, H E
$
Constant
K, H
6
221