5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-64
API
Applicable model
20PM
43
D
D
SUM
P
P
Number of bits which are ON
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
* * * * * * * * *
D
* * * * *
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit
instruction is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
If KnX/KnY/KnM/KnS is used, it is suggested that X device
numbers/Y device numbers/M device numbers/S device numbers
should start from a number which is a multiple of 16 (including 0),
e.g. K1X0, K4Y20 and K4M16.
16-bit instruction (5 steps)
SUM
Continuity
instruction
SUMP
Pulse
instruction
32-bit instruction (9 steps)
DSUM
Continuity
instruction
DSUMP
Pulse
instruction
Flags
Ox O100
M1808 M1968 Zero flag
Explanation
The number of bits which are 1 in S
is stored in D.
S: Source device; D: Destination device
If the bits in S are 0, a zero flag will be ON.
If the 32-bit instruction is used, D will occupy two registers.
Example
When X20 is ON, the number of bits which are 1 in D0 is stored in D2.
X20
SUM
D0
D2
0000 00011 100 0000 3
D2D0