Omron C200HE Computer Hardware User Manual


 
200
Example The following example shows the comparisons made and the results provided
for TCMP(85). Here, the comparison is made during each cycle when 00000 is
ON.
CD: 001 Upper limits R: HR 05
001 0210 HR 10 0100 HR 0500 0
HR 11 0200 HR 0501 0
HR 12 0210 HR 0502 1
HR 13 0400 HR 0503 0
HR 14 0500 HR 0504 0
HR 15 0600 HR 0505 0
HR 16 0210 HR 0506 1
HR 17 0800 HR 0507 0
HR 18 0900 HR 0508 0
HR 19 1000 HR 0509 0
HR 20 0210 HR 0510 1
HR 21 1200 HR 0511 0
HR 22 1300 HR 0512 0
HR 23 1400 HR 0513 0
HR 24 0210 HR 0514 1
HR 25 1600 HR 0515 0
TCMP(85)
001
HR 10
HR 05
00000
Compare the data in IR 001
with the given ranges.
Address Instruction Operands
00000 LD 00000
00001 TCMP(85)
001
HR 10
HR 05
5-17-6 AREA RANGE COMPARE ZCP(88)
CD: Compare data
IR, SR, AR, DM, HR, TC, LR, #
LL: Lower limit of range
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
UL: Upper limit of range
IR, SR, AR, DM, HR, TC, LR, #
ZCP(88)
CD
LL
UL
@ZCP(88)
CD
LL
UL
Limitations LL must be less than or equal to UL.
Description When the execution condition is OFF, ZCP(88) is not executed. When the
execution condition is ON, ZCP(88) compares CD to the range defined by lower
limit LL and upper limit 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
GR (SR 25505) EQ (SR 25506) LE (SR 25507)
CD < LL 0 0 1
LL CD UL 0 1 0
UL < CD 1 0 0
Data Comparison Section 5-17