378
WSUM, WSUMP
[Operation]
: Head number of the devices where data to be summed are stored (BIN 16 bits)
: Head number of the devices where the sum will be stored (BIN 32 bits)
n
: Number of data blocks (BIN 16 bits)
Function
(1) Adds all 16-bit BIN data for n blocks from the device designated at , and stores it in the device designated at .
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
WSUM, WSUMP
Calculation of totals for 16-bit data
7.5.13
WSUM, WSUMP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
n
––
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The points specified in n exceed those of the corresponding device
specified in .
Data
before
sort
-
1
-
99999
-
1111
5000
4
56789
D3
,
D2
D5
,
D
4
D7
,
D6
D9
,
D8
D1
,
D0
Data
after
sort
5000
4
56789
-
1111
1
-
99999
D3
,
D2
D5
,
D
4
D7
,
D6
D9
,
D8
D1
,
D0
-
1111
-
99999
5000
1
4
56789
D3
,
D2
D5
,
D
4
D7
,
D6
D9
,
D8
D1
,
D0
X0
O
N
X0
O
FF
Basic
Process
High
performance
Redundant Universal
LCPU
n
n
WSUM
WSUMP
D
D
Command
Command
W
S
U
MP
W
S
U
M
S
S
S
D
S
D
S
D
4444
(
BIN
)
+ 1
+ 2
3333
(
BIN
)
1234
(
BIN
)
5426
(
BIN
)
329
(
BIN
)
+ 3
+ 4
13914
(
BIN
)
10000
(
BIN
)
+ 5
S
S
D
S
S
S
n
D
S
+ 1
,
S