Mitsubishi MELSEC iQ-F FX5 series Programming Manual page 172

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

D+(P)(_U) [using three operands]
These instructions add the 32-bit binary data in the device specified by (s1) and the 32-bit binary data in the device specified
by (s2), and store the result in the device specified by (d).
Ladder diagram
(s1)
Setting data
■Descriptions, ranges, and data types
Operand
(s1)
D+(P)
D+(P)_U
(s2)
D+(P)
D+(P)_U
(d)
D+(P)
D+(P)_U
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s1)
(s2)
(d)
Processing details
• These instructions add the 32-bit binary data in the device specified by (s1) and the 32-bit binary data in the device
specified by (s2), and store the addition result in the device specified by (d).
(s1)
(s1)+1
···
···
b31
b16 b15
b0
567890 (BIN)
+
• When underflow or overflow occurs in the operation result, the following processing is executed. In this case, the carry flag
(SM700, SM8022) does not turn ON.
In case of D+(P)
K2147483647
+
K2
(7FFFFFFFH)
(00000002H)
K-2147483648
+
K-2
(80000000H)
(FFFFFFFEH)
In case of D+(P)(_U)
K4294967295
+
K2
(FFFFFFFFH)
(00000002H)
Operation error
There is no operation error.
6 BASIC INSTRUCTIONS
170
6.2 Arithmetic Operation Instructions
(s2)
(d)
Description
Augend data or the head device where the
data to which another is added is stored
Addend data or the head device where the
data that is added to another is stored
Head device for storing the operation result
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
(s2)
(s2)+1
···
···
b31
b16 b15
b0
b31
123456 (BIN)
K-2147483647
(80000001H)
K2147483646
(7FFFFFFEH)
K1
(00000001H)
Structured text
ENO:=DPLUS(EN,s1,s2,d);
ENO:=DPLUSP(EN,s1,s2,d);
Range
-2147483648 to +2147483647
0 to 4294967295
-2147483648 to +2147483647
0 to 4294967295
Double word Indirect
U\G
Z
LC
(d)
(d)+1
···
···
b16 b15
b0
691346 (BIN)
Because the highest bit is 1, the value is negative.
Because the highest bit is 0, the value is positive.
ENO:=DPLUS_U(EN,s1,s2,d);
ENO:=DPLUSP_U(EN,s1,s2,d);
Data type
32-bit signed binary
32-bit unsigned binary
32-bit signed binary
32-bit unsigned binary
32-bit signed binary
32-bit unsigned binary
Constant
specification
LZ
K, H
Data type (label)
ANY32_S
ANY32_U
ANY32_S
ANY32_U
ANY32_S
ANY32_U
Others
E
$

Advertisement

Table of Contents
loading

Table of Contents