Comparison Instructions
Example
TR
0
00000
25505
25506
25507
Address Instruction
00000
LD
00001
OUT
00002
ZCP(−−)
00003
AND
LL: #0010
0
0
1
5-19-9 DOUBLE AREA RANGE COMPARE – ZCPL(––)
Limitations
290
In the following example, the content of IR 002 (#6FA4) is compared to the
range #0010 to #AB1F. Since #0010 ≤ #6FA4 ≤ #AB1F, the EQ flag and IR
10001 are turned ON.
Operands
00000
TR
0
002
#
0010
#
AB1F
25505
CD: 002
<
0
6
F
A
Ladder Symbol
ZCPL(−−)
CD
LL
UL
The 8-digit value in LL+1,LL must be less than or equal to UL+1,UL.
ZCP(−−)
002
#0010
#AB1F
10000
10001
10002
Address Instruction
00004
OUT
00005
LD
00006
AND
00007
OUT
00008
LD
00009
AND
00010
OUT
UL: #AB1F
<
4
A
B
1
Section 5-19
Greater Than
(above range)
Equal
(within range)
Less Than
(below range)
Operands
10000
TR
0
25506
10001
TR
0
25507
10002
10000: OFF
10001: ON
F
10002: OFF
Operand Data Areas
CD: Compare data
IR, SR, AR, DM, EM, HR, LR
LL: Lower limit of range
IR, SR, AR, DM, EM, HR, LR
UL: Upper limit of range
IR, SR, AR, DM, EM, HR, LR
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?
Questions and answers