Block Compare - Bcmp(68) - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Comparison Instructions
Example
00000
CD: 001
IR
001 0210
Compare the data in IR 001
with the given ranges.
5-18-3 BLOCK COMPARE – BCMP(68)
Limitations
Description
250
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. The function code 68 is
the factory setting and can be changed for the SRM1 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.
When the execution condition is OFF, BCMP(68) is not executed. When the
execution condition is ON, BCMP(68) compares CD to the ranges defined by
a block consisting of CB, CB+1, CB+2, ..., CB+31. Each range is defined by
two words, the first one providing the lower limit and the second word provid-
ing the upper limit. If CD is found to be within any of these ranges (inclusive of
the upper and lower limits), the corresponding bit in R is set. The comparisons
Address Instruction
TCMP(85)
00000
001
00001
DM 0000
216
R: 216
IR 21600
0
IR 21601
0
IR 21602
1
IR 21603
0
IR 21604
0
IR 21605
0
IR 21606
1
IR 21607
0
IR 21608
0
IR 21609
0
IR 21610
1
IR 21611
0
IR 21612
0
IR 21613
0
IR 21614
1
IR 21615
0
@BCMP(68)
CD
CB
R
Section 5-18
Operands
LD
TCMP(85)
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
00000
001
0000
216

Advertisement

Table of Contents
loading

Table of Contents