Omron C200HE User Manual

Page of 564
201
Precautions
Placing other instructions between ZCP(88) 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 is greater than UL.
EQ:
ON if LL 
CD 
UL
LE:
ON if CD < LL.
GR:
ON if CD > UL.
The following example shows how to save the comparison result immediately. If
IR 100 > AB1F, IR 00200 is turned ON; if #0010 
 IR 100 
 AB1F, IR 00201 is
turned ON; if IR 100 < 0010, IR 00202 is turned ON.
ZCP(88)
#0010
IR 100
00000
25505
00200
25507
00202
TR
0
25506
00201
Greater Than
(above range)
Equal
(within range)
Less Than
(below range)
Address
Instruction
Operands
Address
Instruction
Operands
00000
LD
00000
00001
OUT
TR
0
00002
ZCP(88)
IR
100
#
0010
#
AB1F
00003
AND
25505
00004
OUT
00200
00005
LD
TR
0
00006
AND
25506
00007
OUT
00201
00008
LD
TR
0
00009
AND
25507
00010
OUT
00202
#AB1F
5-17-7
DOUBLE AREA RANGE COMPARE – ZCPL(––)
CD: Compare data
IR, SR, AR, DM, HR, LR
LL: Lower limit of range
IR, SR, AR, DM, HR, LR
Ladder Symbols
Operand Data Areas
UL: Upper limit of range
IR, SR, AR, DM, HR, LR
ZCPL(––)
CD
LL
UL
Limitations
The 8-digit value in LL+1,LL must be less than or equal to UL+1,UL.
CD and CD+1 must be in the same data area, as must LL and LL+1, and UL and
UL+1.
Example:
Saving ZCP(88) Results
Data Comparison
Section 5-17