Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 307

Table of Contents

Advertisement

BCMP2
Instruction
EXPANDED BLOCK
COMPARE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
S
Source data
B
First word of block
R
Result word
B: First word of block
15
Word
B
Range 0
B+1
B+2
Range 1
B+3
B+4
Range 2
B+5
B+6
Range
Range 15
B+31
data
B+32
Range 16
B+33
B+34
Range 17
B+35
B+36
Range 18
B+37
B+38
Range N
B+2N+1
B+2(N+1)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
BCMP2
@BCMP2
Block program areas
Step program areas
OK
OK
Description
N: 00 to FF hex
(0 to 255)
Comparison block
8
7
0
00 hex
Last range "N"
Range 0 value A
Range 0 value B
Range 1 value A
Range 1 value B
Range 2 value A
Range 2 value B
Range 15 value A
Range 15 value B
Range 16 value A
Range 16 value B
Range 17 value A
Range 17 value B
Range 18 value A
Range 18 value B
Range N value A
Range N value B
Function
code
Compares the source data to up to 256 ranges
(defined by 256 lower limits and 256 upper limits)
502
and turns ON the corresponding bit in the result
word when the source data is within a range.
BCMP
BCMP2(502)
S
S: Source data
B
B: First word of block
R: First result word
R
Subroutines
OK
R: First result word
Each bit of each R word contains the result of a comparison between S and
one of the ranges defined the comparison block. The maximum number of
result words is 16, i.e., m equals 0 to 15.
15
14
R+m
Comparison result for S
and range 16m + 14
Comparison result for S
and range 16m + 15
3. Instructions
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Data type
Size
WORD
1
WORD
Variable
WORD
Variable
n
0
Comparison result for
and range 16m
Comparison result for S
and range 16m + n
3
269

Advertisement

Table of Contents
loading

Table of Contents