Mitsubishi Electric MELSEC-Q/L Programming Manual page 228

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

D+(P), D-(P) [When three data are set]
D+, D
D+P, D P
(S1): Data to be added to/subtracted from or head number of the devices where the data to be added to/subtracted from is stored (BIN 32 bits)
(S2): Data for adding/subtracting or head number of the devices where the data for adding/subtracting is stored (BIN 32 bits)
(D): Head number of the devices where the multiplication/division operation result will be stored (BIN 32 bits)
Setting
Internal device
data
Bit
(S1)
(S2)
(D)
Processing details
■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).
+1
S1
S1
b31
b16 b15
b0
567890 (BIN)
• The values for (S1), (S2) and (D) can be designated at between -2147483648 and 2147483647 (BIN 32 bits).
• Judgment of whether the data is positive or negative is made on the basis of 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 (SM700) in this
case does not turn ON.
K2147483647
+K2
(7FFFFFFF
)
(00000002
H
K 2147483648
+K 2
(80000000
)
(FFFFFFFE
H
6 BASIC INSTRUCTIONS
226
6.2 Arithmetic Operation Instructions
Command
Command
R, ZR
Word
+1
D
S2
S2
b31
b16 b15
b0
b31
123456 (BIN)
691346 (BIN)
K 2147483647
)
(80000001
)
H
H
K2 147483646
)
(7FFFFFFE
)
H
H
P
J\
Bit
Word
+1
D
b16 b15
b0
Since bit 31 value is "1",
result of operation takes a negative value.
Since bit 31 value is "0",
result of operation takes a positive value.
indicates an instruction symbol of
D
S1
S2
D
S1
S2
U\G
Zn
Constant
K, H
D+/ D
.
Others

Advertisement

Table of Contents
loading

Table of Contents