EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 274

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
241
Comparison Instructions Section 3-6
When B+1 > B+2
If S
B+2 and B+1 S, then bit 0 of R will turn ON,
If S
B+4 and B+3 S, then bit 1 of R will turn ON,
If B+6
< S < B+5, then bit 2 of R will turn OFF, and
If B+8
< S < B+7, then bit 3 of R will turn OFF.
Results Storage Location
The results are output to corresponding bits in word R. If there are more than
16 comparison ranges, consecutive words following R will be used.The maxi-
mum number of result words is 16, i.e., m equals 0 to 15.
Flags
Example When CIO 0.00 is ON in the following example, BCMP2(502) compares the
content of CIO 1000 with the 24 ranges defined in D200 through D247 (N = 17
hex = 23 decimal, i.e., 24 ranges) and turns ON the corresponding bits in
CIO 2000 and CIO 2001 when S is within the range and OFF when S is not
within the range. For example, if the source data in CIO 1000 is in the range
defined by D201 and D202, then bit 00 of CIO 2000 is turned ON and if it in
not in the range, then bit 00 of CIO 2000 is turned OFF. Likewise, the source
data in CIO 1000 is compared to the ranges defined by D203 and D204, D247
and D248, and the other words in the comparison block, and bit 1 in
CIO 2000, bit 7 in CIO 2001, and the other bits in the result words are manip-
ulated according to the results of comparison.
15 014
Comparison result for
S and range 16m + 14
Comparison result for
S and range 16m + n
Comparison result for
S and range 16m
Comparison result for
S and ran
g
e 16m + 15
R+m
n
Name Label Operation
Error Flag ER OFF
BCMP2
1000
D200
2000
0.00
D202
D204
D206
D232
D234
D236
D238
D248
0100
0180
0260
1800
0500
0100
0200
2000
S: CIO 1000 0175
0017
D201
D203
D205
D231
D233
D235
D237
D247
0000
0080
0160
1200
1500
1900
1800
0100
R: CIO 2000
R: CIO 2001
T: D200
Bit

Table of Contents

Related product manuals