Double Signed Binary Compare - Cpsl - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Data Comparison
Flags
5-17-9 DOUBLE SIGNED BINARY COMPARE – CPSL(––)
Limitations
Description
Precautions
Flags
Indirectly addressed DM word is non-existent. (Content of ∗DM word is
ER:
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
p
Cp1 < Cp2
Cp1 = Cp2
Cp1 > Cp2
Ladder Symbols
CPSL(––)
Cp1
Cp2
Cp1 and Cp1+1 must be in the same data area, as must Cp2 and Cp2+1.
When the execution condition is OFF, CPSL(––) is not executed. When the exe-
cution 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 29 for details on 32-bit signed binary data.
2. Refer to 5-17-2 Compare – CMP(20) for details on saving comparison re-
sults.
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.
Indirectly addressed DM word is non-existent. (Content of ∗DM word is
ER:
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
p
Cp1+1, Cp1 < Cp2+1, Cp2
Cp1+1, Cp1 = Cp2+1, Cp2
Cp1+1, Cp1 > Cp2+1, Cp2
Flag status
GR (SR 25505)
EQ (SR 25506)
0
0
0
1
1
0
Operand Data Areas
Cp1: First compare word
IR, SR, AR, DM, HR, TC, LR
Cp2: Second compare word
IR, SR, AR, DM, HR, TC, LR
Flag status
GR (SR 25505)
EQ (SR 25506)
0
0
0
1
1
0
Section 5-17
LE (SR 25505)
1
0
0
LE (SR 25507)
1
0
0
179

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents