7. APPLICATION INSTRUCTIONS
7 − 43
MELSEC-A
7.4.2 16-, 32-bit data bit check
(SUM, SUMP, DSUM, DSUMP)
Available Device
Bit device Word (16-bit) device Constant Pointer
Level
Carry
flag
Error
flag
X Y M L S B F T C D W R A0 A1 Z V K H P I N
Digit specification
Index
M9012 (M9010, M9011)
SUM (S) O O O O O O O O O O O O O O O O
DSUM (S) O O O O O O O O O O O O O O
O O
Functions SUM
Stores in A0 the total number of bits which are one found in the 16-bit data of device
specified at (S).
The A0J2HCPU stores the total number of bits also in D9003.
DSUM
Stores to A0 the total number of bits which are one found in the 32-bit data of device
specified at (S).
Applicable
CPU
All CPUs
K1 to
K4
K1 to
K8
Operation commands
(S)
Head number of device
which counts the total
number of bits which are
"1".
Setting data
SUM, DSUM
Indicates the instruction symbol.
(S)
(S)
P
Before execution
After execution
Total number of 1s
Total number of 1s is stored in BIN.(8 pcs. in this example)
16 bits
Before execution
After execution
Total number of 1s is stored in BIN. (16 pcs. in this example)
32 bits