EasyManuals Logo

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 User Manual

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008
1405 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #365 background imageLoading...
Page #365 background image
325
Comparison Instructions Section 3-7
Setting Ranges
The values A and B for each range will determine how the comparison oper-
ates depending on which value is larger, as shown below.
Example
When B+1
≤ B+2
If B+1
≤ S ≤ B+2, then bit 0 of R will turn ON,
If B+3
≤ S ≤ B+4, then bit 1 of R will turn ON,
If S < B+5 and B+6 < S, then bit 2 of R will turn OFF, and
If S < B+7 and B+8 < S, then bit 3 of R will turn OFF.
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 000000 is ON in the following example, BCMP2(502) compares
the content of CIO 0010 with the 24 ranges defined in D00200 through
D00247 (N = 17 hex = 23 decimal, i.e., 24 ranges) and turns ON the corre-
sponding bits in CIO 0100 and CIO 0101 when S is within the range and OFF
when S is not within the range. For example, if the source data in CIO 0010 is
in the range defined by D00201 and D00202, then bit 00 of CIO 0100 is
turned ON and if it in not in the range, then bit 00 of CIO 0100 is turned OFF.
Likewise, the source data in CIO 0010 is compared to the ranges defined by
D00203 and D00204, D00247 and D00248, and the other words in the com-
Value A Value B
Comparison range
Value B
Comparison
range
· If Value A ≤ Value B
Then, Value A ≤ Comparison range ≤ Value B
· If Value A > Value B
Then, Comparison range ≤ Value B and Value A ≤ Comparison range
Comparison
range
Value A
15 014
Comparison result for
S and range 15m + 14
Comparison result for
S and range 15m + n
Comparison result for
S and range 15m
Comparison result for
S and ran
g
e 15m + 15
R+m
n
Name Label Operation
Error Flag ER OFF

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 and is the answer not in the manual?

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CJ - REFERENCE MANUAL 08-2008
CategoryController
LanguageEnglish

Related product manuals