596
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
25 Block Data Operation – FNC190 to FNC199
25.3 FNC194~199 – BKCMP=, >, <, < >, <=, >= / Block Data Compare
Program example
1) In the program shown below, four 16-bit binary data starting from D100 are compared with four 16-bit
binary data starting from D200 by BKCMP= (FNC194) instruction when X020 is set to ON, and the
comparison result is stored in four points starting from M10.
When the comparison result is "ON (1)" in all of the four points starting from M10, Y000 is set to ON.
2) In the program shown below, the constant K1000 is compared with four data starting from D10 when
X010 is set to ON, and the comparison result is stored in b4 to b7 of D0.
D100
Comparison
result
=
K1000
K2000
K4000
K3000
D101
D102
D103
OFF
Y000
D200
K1000
K2000
K4000
K5000
D201
D202
D203
M10
ON
ON
ON
OFF
M11
M12
M13
X020
FNC194
BKCMP=
D100
D200
M10
END
K4
Y000
M8090
Block comparison signal
(When all of M10 to M13 are ON, Y000 is set to ON.)
<>
K1000
K2000
K1000
K2222
K1000
X010
FNC197
BKCMP<>
K1000
D10
D0.4
END
K4
D10
D11
D12
D13
b15
b7
b4
b0
D0 before
operation
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
b15
b7
b4
b0
D0 after
operation
0
0
0
0
1
0
0
1
0
1
0
0
0
0
1
0