Mitsubishi MELSEC QS Series Programming Manual page 105

Hide thumbs Also See for MELSEC QS Series:
Table of Contents

Advertisement

(1) Subtracts 16-bit BIN data designated by
stores the result of the subtraction at the device designated by
(2) Values for
(3) The judgment of whether data is positive or negative is made by the most significant bit
(b15).
• 0: Positive
• 1: Negative
(4) The following will happen when an underflow or overflow is generated in an operation result:
The carry flag in this case does not go ON.
. K 32768
K2
(H8000)
(H0002)
. K32767
K 2
(H7FFF)
(HFFFE)
Operation Error
(1) There are no operation errors associated with the +(P) or –(P) instructions.
D
b15
b0
b15
5678 (BIN)
and
can be designated between
S
D
K32766
Since b15 is "0", the judgment is
a positive value.
(H7FFE)
K 32767
Since b15 is "1", the judgment is
(H8001)
a negative value.
6.2.1 BIN 16-bit addition and subtraction operations (+(P), –(P))
from 16-bit BIN data designated by
D
S
D
b0
b15
1234 (BIN)
4444 (BIN)
32768 and 32767 (BIN, 16 bits).
6.2 Arithmetic Operation Instructions
+(P), -(P)
and
S
.
D
b0
6-7
6

Advertisement

Table of Contents
loading

Table of Contents