8. Function Commands
DSUM, DSUMP
- 281 -
Program example
Program to obtain the No. of D10, D11 data bits that are set to ON (1) when XB turns ON.
Coding
No. of
steps
Com-
mand
Device
10 LD XB
11 DSUM D10 D20
D10DSUM D20
XB
10
15
D10, D11
D20
011010000001 110
B31……………………………………………B0
The total No. of bits set
to1isstoredinD20
6
Counter data
Counting with DSUM command