![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268364.webp)
325
Comparison Instructions
Section 3-7
Operand Specifications
Description
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.
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.
Area
S
B
R
CIO Area
CIO 0000 to CIO 6143
Work Area
W000 to W511
Holding Bit Area
H000 to H511
Auxiliary Bit Area
A000 to A959
A448 to A959
Timer Area
T0000 to T4095
Counter Area
C0000 to C4095
DM Area
D00000 to D32767
EM Area without bank
---
EM Area with bank
---
Indirect DM/EM
addresses in binary
@ D00000 to @ D32767
Indirect DM/EM
addresses in BCD
*D00000 to *D32767
Constants
#0000 to #FFFF
(binary)
---
Data Registers
DR0 to DR15
---
Index Registers
---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
B+1
B+3
B+5
B+31
B+33
B+35
B+37
B+2N+1
B
0
1
2
15
0
1
2
R
R+1
0
7
8
15
S
:
:
:
:
B+2
B+4
B+6
B+32
B+34
B+36
B+38
B+2N+2
Bit
Bit
Result words
Comparison ranges
Comparison block
Source data
Range 0 value A
Range 1 value A
Range 2 value A
Range 15 value A
00 hex
Last range
"N"
N: 00 to FF hex (0 to 255)
Range 0 value B
Range 1 value B
Range 2 value B
Range 15 value B
In range: ON
Not in range: OFF
Ranges
Range 16 value A
Range 17 value A
Range 18 value A
Range N value A
Range 16 value B
Range 17 value B
Range 18 value B
Range N value B
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...