Mitsubishi Electric MELSEC FX3U Programming Manual page 643

Melsec fx series programmable logic controllers
Table of Contents
FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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.
X020
M8090
Block comparison signal
D100
K1000
D101
K2000
D102
K3000
D103
K4000
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.
X010
K1000
25.3 FNC194~199 – BKCMP=, >, <, < >, <=, >= / Block Data Compare
FNC194
D100
D200
BKCMP=
D200
K1000
D201
K2000
=
D202
K5000
D203
K4000
(When all of M10 to M13 are ON, Y000 is set to ON.)
FNC197
K1000
D10
BKCMP<>
D10
K2000
D11
K1000
<>
D12
K1000
D13
K2222
25 Block Data Operation – FNC190 to FNC199
M10
K4
Y000
END
Comparison
result
M10
ON
M11
ON
M12
OFF
M13
ON
Y000
OFF
D0.4
K4
END
b15
D0 before
0
1
0
0
0
0
operation
b15
D0 after
0
1
0
0
0
0
operation
b7
b4
b0
1
0
0
0
1
0
0
0
0
0
b7
b4
b0
1
0
1
0
0
1
0
0
0
0
641
21
22
23
24
25
26
27
28
29
30
Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents