Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 364

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Comparison Instructions
Operand Specifications
Description
Area
CIO Area
Work Area
Holding Bit Area
Auxiliary Bit Area
Timer Area
Counter Area
DM Area
EM Area without bank
EM Area with bank
Indirect DM/EM
addresses in binary
Indirect DM/EM
addresses in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
BCMP2(502) compares the source data (S) to the ranges defined by pairs of
lower and upper limit values in the comparison block. If S is within any of
these ranges (inclusive of the upper and lower limits), the corresponding bits
in the result words (R to R+15 max.) are turned ON. The rest of the bits in R
will be turned OFF.
The number of ranges is determined by the value N set in the lower byte of B.
N can be between 0 and 255. The upper byte of B must be 00 hex.
Source data
S
Number of Ranges
The number of ranges in the comparison block is set in the first word of the
block. Up to 256 ranges can be set.
S
CIO 0000 to CIO 6143
W000 to W511
H000 to H511
A000 to A959
T0000 to T4095
C0000 to C4095
D00000 to D32767
---
---
@ D00000 to @ D32767
*D00000 to *D32767
#0000 to #FFFF
---
(binary)
DR0 to DR15
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Comparison block
15
8
7
0
Last range
B
00 hex
N: 00 to FF hex (0 to 255)
"N"
Comparison ranges
B+1
Range 0 value A
Range 0 value B
B+3
Range 1 value A
Range 1 value B
B+5
Range 2 value A
Range 2 value B
:
B+31
Range 15 value A
Range 15 value B
B+33
Range 16 value A
Range 16 value B
B+35
Range 17 value A
Range 17 value B
B+37
Range 18 value A
Range 18 value B
:
B+2N+1
Range N value A
Range N value B
Ranges
Section 3-7
B
R
A448 to A959
Result words
R
Bit
B+2
0
B+4
1
B+6
2
:
B+32
15
R+1
Bit
0
B+34
1
B+36
B+38
2
:
B+2N+2
In range: ON
Not in range: OFF
325

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents