Mitsubishi MELSEC QS Series Programming Manual page 110

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

Advertisement

D+(P), D-(P)
When three data are set ((
(
+ 1,
S1
D+,D
D+P,
D
P
Function
D+
(1) Adds 32-bit BIN data designated by
result of the addition at the device designated by
(2) The values for
(BIN 32 bits).
(3) Judgment of whether the data is positive or negative is made on the basis of the most
significant bit (b31).
• 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.
. K2147483647
(H7FFFFFFF)
. K 214748364 8
(H80000000)
6-12
6.2 Arithmetic Operation Instructions
6.2.2 BIN 32-bit addition and subtraction operations (D+(P), D–(P))
+ 1,
S1
S1
) – (
+ 1,
)
(
+1,
S1
S2
S2
D
Command
Command
: Data to be added to/subtracted from or start number of the devices where the data to be added to/subtracted
S1
from is stored (BIN 32 bits)
: Data for additing/subtracting or start number of the devices where the data for additing/subtracting is stored
S2
(BIN 32 bits)
: Start number of the devices where the addition/subtraction operation result will be stored (BIN 32 bits)
D
Internal Devices
Set
Data
Bit
Word
S1
S2
S1
D
+1
S1
S1
b31
b16 b15
b0
b31
567890 (BIN)
+
,
and
can be designated at between
S1
S2
D
+K2
K 2147483647
(H00000002)
(H80000001)
+K
2
K2147483646
(HFFFFFFFE)
(H7FFFFFFE)
) + (
+ 1,
)
(
+ 1,
S2
S2
D
))
D
S1
P
S1
Constants
Others
K, H
––
––
––
––
to 32-bit BIN data designated by
S1
.
D
+1
+1
S2
S2
D
b16 b15
b0
b31
b16 b15
123456 (BIN)
691346 (BIN)
Since b31 is "1", the judgment is
a negative value.
Since b31 is "0", the judgment is
a positive value.
),
D
indicates "D+ / D-".
D
S2
D
S2
, and stores the
S2
D
b0
2147483648 and 2147483647

Advertisement

Table of Contents
loading

Table of Contents