Mitsubishi Electric M800VW Series Programming Manual page 197

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
-
 Subtracts 16-bit BIN data designated by (D) from 16-bit BIN data designated by (S) and stores the result of the subtraction
at the device designated by (D).
D
b15
b0
5678 (BIN)
 The values for (S) and (D) can be designated between -32768 and 32767 (BIN 16 bits).
 The judgment of whether data is positive or negative is made by the most significant bit (b15).
b15
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.
- K-32768 - K2 -> K32766 ---- A positive value is generated if b15 is 0.
(H8000) (H0002) (H7FFE)
- K32767 - K-2 -> K-32767 ---- A negative value is generated if b15 is 1.
(H7FFF) (HFFFE) (H8001)
 Operation errors
 There are no arithmetic errors associated with the "+(P)" or "-(P)" instructions.
IB-1501667-B
S
b15
b0
1234 (BIN)
D
b15
b0
4444 (BIN)
176

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents