Arithmetic Operation Instructions; Bin 16-Bit Addition And Subtraction Operations (+(P),-(P)) - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

+(P),-(P)
6.2

Arithmetic Operation Instructions

6.2.1

BIN 16-bit addition and subtraction operations (+(P),-(P))

+(P),-(P)
When two data are set (
+,
+P, P
Setting
Data
S
D
Function
+
(1) Adds 16-bit BIN data designated by
result of the addition at the device designated by
(2) Values for
(3) The judgment of whether data is positive or negative is made by the most significant bit
(b15).
• 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.
K32767 +K2
(7FFF
K 32768 +K 2
(8000
6-22
+
D
S
D
Command
Command
: Data for additing/subtracting or head number of the devices where the data for additing/subtracting is stored
S
(BIN 16 bits)
: Head number of the devices where the data to be added to/subtracted from is stored (BIN 16 bits)
S1 D
Internal Devices
R, ZR
Bit
Word
D
b15
b0
5678 (BIN)
and
can be designated between
S
D
K 32767
(0002
)
)
(8001
)
H
H
H
K32766
(FFFE
)
(7FFE
)
)
H
H
H
High
Basic
performance
,
-
)
D
S
D
indicates an instruction symbol of
P
J
\
U
\G
Bit
Word
to 16-bit BIN data designated by
D
.
D
S
b15
b0
b15
1234 (BIN)
6912 (BIN)
32768 and 32767 (BIN, 16 bits).
Since bit 15 value is "1",
result of operation takes a negative value.
Since bit 15 value is "0",
result of operation takes a positive value.
Process
Redundant Universal
+/
.
S
D
S
D
Constants
Zn
Other
K, H
––
––
––
and stores the
S
D
b0
LCPU

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents