Double Compare - Cmpl(60) - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Comparison Instructions
Example
00000
CD 001
001
0210
Compare data in IR 001
(which contains 0210) with
the given ranges.
5-19-4 DOUBLE COMPARE – CMPL(60)
Limitations
Description
Precautions
284
The following example shows the comparisons made and the results provided
for BCMP(68). Here, the comparison is made during each cycle when IR
00000 is ON.
BCMP(68)
DM 0010
LR 05
Lower limits
DM 0010
0000
DM 0012
0101
DM 0014
0201
DM 0016
0301
DM 0018
0401
DM 0020
0501
DM 0022
0601
DM 0024
0701
DM 0026
0801
DM 0028
0901
DM 0030
1001
DM 0032
1101
DM 0034
1201
DM 0036
1301
DM 0038
1401
DM 0040
1501
Ladder Symbols
CMPL(60)
Cp1
Cp2
−−
Cp1 and Cp1+1 must be in the same data area.
Cp2 and Cp2+1 must be in the same data area.
Set the third operand to 000.
When the execution condition is OFF, CMPL(60) is not executed. When the
execution condition is ON, CMPL(60) joins the 4-digit hexadecimal content of
Cp1+1 with that of Cp1, and that of Cp2+1 with that of Cp2 to create two 8-
digit hexadecimal numbers, Cp+1,Cp1 and Cp2+1,Cp2. The two 8-digit num-
bers are then compared and the result is output to the GR, EQ, and LE flags
in the SR area.
Placing other instructions between CMPL(60) and the operation which
accesses the EQ, LE, and GR flags may change the status of these flags. Be
sure to access them before the desired status is changed.
Address Instruction
00000
LD
001
00001
BCMP(68)
Upper limits
DM 0011
0100
DM 0013
0200
DM 0015
0300
DM 0017
0400
DM 0019
0500
DM 0021
0600
DM 0023
0700
DM 0025
0800
DM 0027
0900
DM 0029
1000
DM 0031
1100
DM 0033
1200
DM 0035
1300
DM 0037
1400
DM 0039
1500
DM 0041
1600
Operand Data Areas
Cp1: First word of first compare word pair
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Cp2: First word of second compare word pair
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Section 5-19
Operands
00000
001
DM
0010
LR
05
R:LR 05
LR 0500
0
LR 0501
0
LR 0502
1
LR 0503
0
LR 0504
0
LR 0505
0
LR 0506
0
LR 0507
0
LR 0508
0
LR 0509
0
LR 0510
0
LR 0511
0
LR 0512
0
LR 0513
0
LR 0514
0
LR 0515
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents