6-17
BKCMP
,BKCMP
P
1
2
3
4
4
6
7
8
6.1 Comparison Operation Instructions
6.1.6 BIN block data comparisons (BKCMP
,BKCMP P)
(2) The following program compares, when X1C is turned ON, the constant K1000 with the data
stored at D10 to D13, and stores the operation result at b4 to b7 in D0.
[Ladder Mode] [List Mode]
[Operation]
(3) The following program compares, when X20 is turned ON, the data at D10 to D12 with the
data at D30 to D32, and stores the operation result into the area starting from M100.
The following program transfers the character string "ALL ON" to D100 onward when all
devices from M100 onward have reached the 1 "ON" state.
[Ladder Mode] [List Mode]
[Operation]
Step
Instruction
Device
b15 b0
2000 (BIN)
D11 1000 (BIN)
2222 (BIN)
1000 (BIN)
D10
D12
D13
(BIN)
b15 b0
1000
b15 b4
0
1
0 000
1
0
1
0
01
0
0 00
b7
b0
D0 after
operation
b15 b4
0
1 0 000 1 0001000 00
b7 b0
D0 before
operation
Step
Instruction
Device
b15 b0 b15 b0
4321 (BIN)
D31
5678 (BIN)
9999 (BIN)
D30
D32
ON
ON
ON
M101
M100
M102
ON
SM704
(BIN)
D11
(BIN)
(BIN)
D10
D12
1234
5678
9876
4C
H
(L)
b15 b8
41
H
(A)
b7
b0
D101
4C
H
(L)
D102
4F
H
(O)
20
H
( )
D100
$MOV
4E
H
(N)