Mitsubishi MELSEC-A Series Programming Manual page 115

Type acpu/qcpu-a (a mode)
Hide thumbs Also See for MELSEC-A Series:
Table of Contents

Advertisement

6. BASIC INSTRUCTIONS
CAUTION
(1) The comparison instructions make the comparison, regarding the specified data as a BIN
value. For this reason, in the case of comparison made in BCD value or hexadecimal, when
a numeric value (8 to F) having 1 at the highest bit (B15 in a 16-bit instruction or B31 in a
32-bit instruction) is specifies, the comparison is made with the numeric value regarded as
the negative of the BIN value.
Example
Comparison with 4-digit BCD value
Since the result is -30927<1384, Y10 does not turn ON.
(2) When the comparison of 32-bit data is made, specify the numeric value using the 32-bit
instruction such as DMOV. If a 16-bit instruction such as MOV is used, comparison cannot
be executed correctly.
Example
M9036
D>
D0
D10
M9036
DMOV
D>
D0
D10
Regarded as
Regarded as
-30927 in
1384 in BIN
BIN value.
value.
K
DMOV 107 D0
K
DMOV 79
D10
(
M5
)
K
256
D0
K
MOV
86
D10
(
M5
)
6 − 3
MELSEC-A
M5 turns ON.
Since values of 32-bit data D10 and D11
are determined by content of D11, the
comparison result is unknown.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acpu-common-p-e13j741AcpuQcpu-a

Table of Contents