Comparison Instructions
Example
00000
CD: HR 00
HR
00
0210
Compare the data in IR 001
with the given ranges.
7-19-3 BLOCK COMPARE – BCMP(68)
Limitations
434
The following example shows the comparisons made and the results provided
for TCMP(85). Here, the comparison is made during each cycle when IR 00000
is ON.
Upper limits
DM 0000
0100
DM 0001
0200
DM 0002
0210
DM 0003
0400
DM 0004
0500
DM 0005
0600
DM 0006
0210
DM 0007
0800
DM 0008
0900
DM 0009
1000
DM 0010
0210
DM 0011
1200
DM 0012
1300
DM 0013
1400
DM 0014
0210
DM 0015
1600
Ladder Symbols
BCMP(68)
CD
CB
R
Note BCMP(68) is an expansion instruction for the SRM1(-V2). The function code 68
is the factory setting and can be changed for the SRM1(-V2) if desired.
Each lower limit word in the comparison block must be less than or equal to the
upper limit.
DM 6144 to DM 6655 cannot be used for R.
Address
TCMP(85)
00000
HR 00
00001
DM 0000
216
R: 216
IR 21000
0
IR 21001
0
IR 21002
1
IR 21003
0
IR 21004
0
IR 21005
0
IR 21006
1
IR 21007
0
IR 21008
0
IR 21009
0
IR 21010
1
IR 21011
0
IR 21012
0
IR 21013
0
IR 21014
1
IR 21015
0
@BCMP(68)
CD
CB
R
Section
Instruction
Operands
LD
TCMP(85)
HR
DM
Operand Data Areas
CD: Compare data
IR, SR, AR, DM, HR, TC, LR, #
CB: First comparison block word
IR, SR, DM, HR, TC, LR
R: Result word
IR, SR, AR, DM, HR, TC, LR
7-19
00000
00
0000
216
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?