Bin 32-Bit Addition And Subtraction Operations (D+(P), D-(P)) - Mitsubishi MELSEC QS Series Programming Manual

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

Advertisement

D+(P), D-(P)
6.2.2
BIN 32-bit addition and subtraction operations (D+(P), D–(P))
D+(P), D-(P)
When two data are set ((
(
+1,
D
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.
. K 2147483647
( H7FFFFFFF)
. K 214748364 8
( H8000000 0)
6-10
6.2 Arithmetic Operation Instructions
6.2.2 BIN 32-bit addition and subtraction operations (D+(P), D–(P))
+ 1,
D
D
) – (
+ 1,
)
(
+1,
D
S
S
D
Command
Command
: Data for additing/subtracting or start number of the devices where the data for additing/subtracting is stored
S
(BIN 32 bits)
: Start number of the devices where the data to be added to/subtracted from is stored (BIN 32 bits)
D
Internal Devices
Set
Data
Bit
Word
S
D
D
+1
D
b31
b16 b15
b0
567890 (BIN)
+
and
can be designated at between
S
D
+K2
K
2147483647
( H00000002)
( H80000001 )
+K 2
K 214748364 6
(HFFFFFFFE)
( H7FFFFFFE)
) + (
+ 1,
)
(
+ 1,
S
S
D
))
D
P
Constants
Others
K, H
––
––
––
to 32-bit BIN data designated by
D
.
D
S
+1
S
D
+1
b31
b16 b15
b0
b31
b16 b15
123456 (BIN)
691346 (BIN)
2147483648 and 2147483647
Since b31 is "1", the judgment is
a negative value.
Since b31 value is "0", the judgment is
a positive value.
),
D
indicates "D+ / D-".
S
D
S
D
, and stores the
S
D
b0

Advertisement

Table of Contents
loading

Table of Contents