Bin 32-Bit Addition And Subtraction Operations: D+, D - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU

5.4.4 BIN 32-bit addition and subtraction operations: D+, D-

Setting
data
(Note-1)
X
Y
M
(S1)
(S2)
(D)
[Setting data]
[Function]
Bit device
SM
F
T
C
D
[Instruction]
Command
D+
Command
D-
Setting data
Number of the devices where the data to be added to/subtracted from is
(S1)
Data for adding/subtracting or number of the devices where the data for
(S2)
Number of the devices where the addition/subtraction operation result will
(D)
(1) BIN 32-bit addition operation (D+)
• Adds 32-bit BIN data designated by (S1) to 32-bit BIN data designated by (S2)
and stores the result of the addition at the device designated by (D).
• Values for (S1), (S2) and (D) can be designated between -2147483648 and
2147483647 (BIN 32 bits).
• Judgment of whether data is positive or negative is made by the most
significant bit (b31).
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
(7FFFFFFFH) (00000002H)
K-2147483648 + K-2
(80000000H)
Usable device
Word device
W
T
C
SD
Z
(Note-1): Cannot specify the same device in (S1) and (D), or (S2) and (D).
D+
(S1)
D-
(S1)
stored (BIN 32 bits)
adding/subtracting is stored (BIN 32 bits)
be stored (BIN 32 bits)
→ K-2147483647 ......Since bit 31 value is "1",
(80000001H)
→ K2147483646 .......Since bit 31 value is "0",
(FFFFFFFEH)
(7FFFFFFEH)
5 - 32
Constant
Pointer
Level
K
H
P
N
(S2)
(D)
(S2)
(D)
Description
result of operation takes a
negative value.
result of operation takes a
positive value.
Digit
desig-
Index
nation
: Usable

Advertisement

Table of Contents
loading

Table of Contents