8
DATA PROCESSING
8.1
Data Processing Instructions
Adding 16-bit binary data
WSUM(_U)
These instructions add the (n) points of 16-bit binary data from the specified device.
ST
ENO:=WSUM(EN,s,n,d);
■Execution condition
Instruction
WSUM
WSUM_U
Setting data
■Description, range, data type
Operand
Description
(s)
WSUM
Start device where the data for calculating the total value are
stored
WSUM_U
(d)
WSUM
Start device for storing the total value
WSUM_U
(n)
Number of data
EN
Execution condition
ENO
Execution result
*1 When specifying setting data by using a label, define an array to secure enough operation area and specify an element of the array
label.
■Applicable devices/labels
Operand
Bit
(s)
(d)
(n)
Processing details
• These instructions add the (n) points of 16-bit binary data in the device starting from the one specified by (s), and store the
result in the device specified by (d).
(s)
4444 (BIN)
(s)+1
3333 (BIN)
(s)+2
1234 (BIN)
(n)
(s)+3
-5426 (BIN)
(s)+4
329 (BIN)
(s)+5
10000 (BIN)
Operation error
There is no operation error.
Execution condition
(d)
13914 (BIN)
(d)+1
ENO:=WSUM_U(EN,s,n,d);
Range
0 to 65535
Word
8.1 Data Processing Instructions
Data type
*1
ANY16_S
*1
ANY16_U
ANY32_S
ANY32_U
ANY16
BOOL
BOOL
Constant
8 DATA PROCESSING
97
8