Omron C200HE ユーザーズマニュアル

ページ / 564
203
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of 
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON if Cp1 equals Cp2.
LE:
ON if Cp1 is less than Cp2.
GR:
ON if Cp1 is greater than Cp2.
Comparison result
Flag status
GR (SR 25505)
EQ (SR 25506)
LE (SR 25507)
Cp1 < Cp2
0
0
1
Cp1 = Cp2
0
1
0
Cp1 > Cp2
1
0
0
5-17-9
DOUBLE SIGNED BINARY COMPARE – CPSL(––)
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
Third operand: Set to 000.
---
CPSL(––)
Cp1
Cp2
000
Limitations
Cp1 and Cp1+1 must be in the same data area, as must Cp2 and Cp2+1.
Description
When the execution condition is OFF, CPSL(––) is not executed. When the
execution condition is ON, CPSL(––) compares the 32-bit (8-digit) signed binary
contents in Cp1+1, Cp1 and Cp2+1, Cp2 and outputs the result to the GR, EQ,
and LE flags in the SR area.
Note
1. Refer to page 27 for details on 32-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 CPSL(––) 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.)
EQ:
ON if Cp1+1, Cp1 equals Cp2+1, Cp2.
LE:
ON if Cp1+1, Cp1 is less than Cp2+1, Cp2.
GR:
ON if Cp1+1, Cp1 is greater than Cp2+1, Cp2.
Comparison result
Flag status
GR (SR 25505)
EQ (SR 25506)
LE (SR 25507)
Cp1+1, Cp1 < Cp2+1, Cp2
0
0
1
Cp1+1, Cp1 = Cp2+1, Cp2
0
1
0
Cp1+1, Cp1 > Cp2+1, Cp2
1
0
0
Data Comparison
Section 5-17