Adding 32-Bit Data - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

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

Advertisement

Adding 32-bit data

DWSUM(P)(_U)
These instructions add the (n) point(s) of 32-bit binary data in the device starting from the one specified by (s), and store the
result in the device specified by (d).
Ladder diagram
(s)
(d)
(n)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
DWSUM(P)
Head device number where the addition target data are
stored
DWSUM(P)_U
(d)
DWSUM(P)
Head device number storing sum
DWSUM(P)_U
(n)
Number of data
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s)
(d)
(n)
Processing details
• These instructions add the (n) point(s) of 32-bit binary data in the device starting from the one specified by (s), and store the
result in the device specified by (d).
(s)+1, (s)
32767000 (BIN)
(s)+3, (s)+2
6000 (BIN)
(n)
(s)+5, (s)+4
35392000 (BIN)
(s)+7, (s)+6
-11870000 (BIN)
(s)+9, (s)+8
12345000 (BIN)
Precautions
In the 32-bit operation, the acquired sum is 64-bit data. The FX5 series CPU module cannot handle 64-bit data. When the sum
is within the numeric range of 32-bit data (K-2147483648 to K2147483647), however, the FX5 series CPU module can handle
the low-order 32 bits of 32-bit data as the sum while ignoring the high-order 32 bits.
Operation error
Error code
Description
(SD0/SD8067)
2820
The device range specified by (d) exceeds the corresponding device range.
The (n) point(s) of data in the device starting from (s) exceed the corresponding device range.
3405
The data stored in a device specified by (n) is 0.
Structured text
ENO:=DWSUM(EN,s,n,d);
ENO:=DWSUMP(EN,s,n,d);
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
(d)+3 to (d)
68640000 (BIN)
Structured text
ENO:=DWSUM_U(EN,s,n,d);
ENO:=DWSUMP_U(EN,s,n,d);
Range
Data type
32-bit signed binary
32-bit unsigned binary
64-bit signed binary
64-bit unsigned binary
16-bit unsigned binary
Double word Indirect
specification
Z
LC
LZ
7 APPLICATION INSTRUCTION
7.17 Data operation instruction
Data type (label)
ANY32
Array of any 32-bit data
(0..1)
ANY16
Constant
Others
K, H
E
$
569
7

Advertisement

Table of Contents
loading

Table of Contents