Mitsubishi Electric M800VW Series Programming Manual page 201

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-
 Subtracts 32-bit data designated by (D) from 32-bit data designated by (S) and stores the result of the subtraction 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.
- By the operation below, b31 is "1" and the result is a negative value.
K-2147483647 (H80000000) - K2 (H0002) = K2147483647 (H7FFFFFFE)
- By the operation below, b31 is "0" and the result is a positive value.
K2147483648 (H7FFFFFFF) - K-2 (HFFFE) = K-2147483646 (H80000001)
 Operation errors
 There are no arithmetic errors associated with the "D+(P)" or "D-(P)" instructions.
IB-1501667-B
S+1
S
b31
b16
b15
b0
123456 (BIN)
D+1
D
b31
b16
b15
b0
444434 (BIN)
180

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents