178
Description When the execution condition is OFF, ZCPL(––) is not executed. When the exe-
cution condition is ON, ZCPL(––) compares the 8-digit value in CD, CD+1 to the
range defined by lower limit LL+1,LL and upper limit UL+1,UL and outputs the
result to the GR, EQ, and LE flags in the SR area. The resulting flag status is
shown in the following table.
Comparison result Flag status
p
GR
(SR 25505) EQ
(SR 25506) LE
(SR 25507)
CD , CD+1< LL+1,LL 0 0 1
LL+1,LL CD, CD+1 UL+1,UL 0 1 0
UL+1,UL < CD, CD+1 1 0 0
Precautions Placing other instructions between ZCPL(––) and the operation which accesses
the EQ, LE, and GR flags may change the status of these flags. Be sure to ac-
cess them before the desired status is changed.
Flags ER: Indirectly addressed DM word is non-existent. (Content of DM word is
not BCD, or the DM area boundary has been exceeded.)
LL+1,LL is greater than UL+1,UL.
EQ: ON if LL+1,LL CD, CD+1 UL+1,UL
LE: ON if CD, CD+1 < LL+1,LL.
GR: ON if CD, CD+1 > UL+1,UL.
Example Refer to

5-17-6 AREA RANGE COMPARE – ZCP(88)

for an example. The only
difference between ZCP(88) and ZCPL(––) is the number of digits in the com-
parison data.
5-17-8 SIGNED BINARY COMPARE – CPS(––)
Cp1: First compare word
IR, SR, AR, DM, HR, TC, LR, #
Cp2: Second compare word
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols Operand Data Areas
CPS(––)
Cp1
Cp2
Description When the execution condition is OFF, CPS(––) is not executed. When the exe-
cution condition is ON, CPS(––) compares the 16-bit (4-digit) signed binary con-
tents in Cp1 and Cp2 and outputs the result to the GR, EQ, and LE flags in the SR
area.
Note 1. Refer to page 29 for details on 16-bit signed binary data.
2. Refer to

5-17-2 Compare – CMP(20)

for details on saving comparison re-
sults.
Precautions Placing other instructions between CPS(––) and the operation which accesses
the EQ, LE, and GR flags may change the status of these flags. Be sure to ac-
cess them before the desired status is changed.
Data Comparison Section 5-17