Mitsubishi FX3G Series Programming Manual page 606

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
Caution
• When using 32-bit counters (including 32-bit high-speed counters)
For comparing 32-bit counters and 32-bit high-speed counters (C200 to C255), make sure to use an instruction for
32-bit operation (DBKCMP=, DBKCMP>, DBKCMP<, DBKCMP<>, DBKCMP<=, or DBKCMP>=).
If an instruction for 16-bit operation (BKCMP=, BKCMP>, BKCMP<, BKCMP<>, BKCMP<=, or BKCMP>=) is used,
an operation error is caused (error code: K6705).
• Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DBKCMP = D0 D100 M0 R0", "n" is [R1, R0].
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When the range of "n" ("2n" in 32-bit operation) points starting from
corresponding device range (error code: K6706)
• When the range of "n" points starting from
• When data registers starting from
from
S
(error code: K6706)
1
• When data registers starting from
from
S
(error code: K6706)
2
• When a 32-bit counter (C200 to C255) is specified in
For comparing 32-bit counters, make sure to use an instruction for 32-bit operation (DBKCMP=, DBKCMP>,
DBKCMP<, DBKCMP<>, DBKCMP<=, or DBKCMP>=).
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
604
Series
D
specified as "D .b" overlap "n" ("2n" in 32-bit operation) points starting
D
specified as "D .b" overlap "n" ("2n" in 32-bit operation) points starting
FNC194
D100
D200
BKCMP=
D200
K1000
D201
K2000
=
D202
K5000
D203
K4000
FNC197
K1000
D10
BKCMP<>
D10
K2000
D11
K1000
<>
D12
K1000
D13
K2222
25 Block Data Operation – FNC190 to FNC199
25.3 FNC194~199 – BKCMP=, >, <, < >, <=, >= / Block Data Compare
exceeds the corresponding device range (error code: K6706)
D
and/or
S
S
1
M10
K4
Y000
END
Comparison
result
M10
ON
M11
ON
M12
OFF
M13
ON
Y000
OFF
(When all of M10 to M13 are ON, Y000 is set to ON.)
D0.4
K4
END
b15
D0 before
0
1
0
operation
b15
D0 after
0
1
0
operation
S
and/or
S
exceeds the
1
2
in 16-bit operation (error code: K6705)
2
b7
b4
0
0
0
1
0
0
0
1
0
b7
b4
0
0
0
1
0
1
0
0
1
b0
0
0
0
0
b0
0
0
0
0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents