Arithmetic Operation Instructions - Mitsubishi Electric M800VW Series Programming Manual

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

8.2 Arithmetic Operation Instructions
+, +P, -, -P: BIN 16-bit addition and subtraction operations (Device at storage destination: Independent
type)
Setting
Bit devices
data
X
Y
M
L
F
S1
S2
D
△ : S1 and S2 cannot be specified as constant at the same time.
[Instruction symbol] [Execution condition]
+, -
+P, -P
 Setting data
Setting data
Data to be added to or subtracted from, or the first number of the device storing
S1
such data
Addition or subtraction data, or first number of device storing addition or subtraction
S2
data
D
The head No. of the device which stores the results of addition or subtraction
 Functions
+
 Adds 16-bit BIN data designated by (S1) to 16-bit BIN data designated by (S2) and stores at the device designated by (D).
S1
b15
b0
+
5678
(BIN)
 The values for S1, S2, 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.
- By the operation below, b15 is "1" and the result is a negative value.
K32767 (H7FFF) + K2 (H0002) = K-32767 (H8001)
- By the operation below, b15 is "0" and the result is a positive value.
K-32767 (H8000) + K-2 (HFFFE) = K32766 (H7FFE)
Usable devices
B SB
T SM V
T
C
Command
Command
Meaning
S2
b15
b0
1234
(BIN)
Con-
Word devices
stant
D
R/ZR W SW SD
Z
K
D
b15
b0
6912
(BIN)
173
Digit
Pointer
designa-
Index
tion
H
P
indicates the signs "+", "/", or "-".
S1 S2
D
P
S1 S2
D
Data type
BIN 16 bits
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents