379
DWSUM, DWSUMP
1
2
3
4
4
6
7
8
7.5
D
ata pr
ocessin
g instru
ctions
7.5.14
DWSUM, DWSUMP
Program Example
(1) The following program adds the 16-bit BIN data from D10 to D14, and stores it in D100 and D101 when X1C is turned
ON.
[Ladder Mode]
[List Mode]
[Operation]
: Head number of the devices where data to be summed are stored (BIN 32 bits)
: Head number of the devices where the sum will be stored (BIN 64 bits)
n
: Number of data blocks (BIN 16 bits)
Function
(1) Adds all 32-bit BIN data stored in n points of devices starting from the one designated by , and stores the result to 4
points of devices (4 words) starting from the one designated by .
DWSUM, DWSUMP
Calculation of totals for 32-bit data
7.5.14
DWSUM, DWSUMP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
––
n
––
Step
Instruction
Device
4500
(
BIN
)
D10
2500
(
BIN
)
3276
(
BIN
)
6780
(
BIN
)
14948
(
BIN
)
D11
D12
D13
D101
,
D100
4444
(
BIN
)
D14
Basic
Process
High
performance
Redundant Universal
LCPU
n
n
DWSUM
DWSUMP
D
D
Command
Command
D
W
S
U
MP
D
W
S
U
M
S
S
S
D
S
D
S
D
11870000
(
B
IN)
32767000
(
B
IN)
6000
(
B
IN)
35392000
(
B
IN)
123
4
5000
(
B
IN)
686
4
0000
(
B
IN)
D
n
+
3
D
+
2
+ 4
+
6
+
8
S
S
S
S
S
+
1
,
+
3
,
+
5
,
+
7
,
+
9
,
S
S
S
S
S
to