Mitsubishi Electric M800VW Series Programming Manual page 200

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.2 Arithmetic Operation Instructions
D+, D+P, D-, D-P: BIN 32-bit addition and subtraction operations (Device at storage destination: Shared
type)
Setting
Bit devices
data
X
Y
M
L
F
S
D
[Instruction symbol] [Execution condition]
D+, D-
D+P, D-P
 Setting data
Setting data
Head No. of the addition/subtraction data or device in which addition or subtraction
S
data is stored.
Head No. of the device in which augend/dividend data is stored.
D
(Addition or subtraction data is stored in this device.)
 Functions
D+
 Adds 32-bit BIN data designated by (D) to 32-bit BIN data designated by (S) and stores at the device designated by (D).
D+1
D
b31
b16
b15
b0
567890 (BIN)
+
 The values for (S) and (D) can be designated between -2147483648 and 2147483647 (BIN 32 bits).
 The judgment of whether data is positive or negative is made by the most significant bit (b31).
b31
Judgment (+/-)
0
Positive
1
Negative
 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 + K2 -> K-2147483647 ---- A negative value is generated if b31 is 1.
(H7FFFFFFF) (H0002) (H80000001)
- K-2147483648 + K-2 -> K2147483646 ---- A positive value is generated if b31 is 0.
(H80000000) (HFFFE) (H7FFFFFFE)
Usable devices
B SB
T SM V
T
C
Command
Command
Meaning
S+1
S
b31
b16
b15
b0
123456 (BIN)
Word devices
D
R/ZR W SW SD
Z
K
D+1
D
b31
b16
b15
b0
691346 (BIN)
179
Digit
Con-
Pointer
designa-
Index
stant
tion
H
P
indicates the signs D+ / D-
S
D
P
S
D
Data type
BIN 32 bits
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents