Delta AS Series Programming Manual page 636

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
1201
D
SUM
Device
X
Y
M
S
D
Data
type
S
D
Symbol
Explanation
1.
This instruction finds the number of bits in S whose values are ON and stores the number of ON bits in D.
2.
When the values of all the bits in the source device specified by S are 0, the zero flag SM600 is ON.
3.
Only the 32-bit instructions can use the 32-bit counter, but not the device E.
Example
When X0.0 is ON, the instruction stores the number of bits whose values are one in D0 in D2.
b15
0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0
D0
Additional remarks
If the device exceeds the range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.
Operand
P
S, D
S
T
C
HC
Pulse instruction
S : Source device
D : Destination device
b0
3
D2
Ch ap te r 6 Ap pl ie d Instruc ti ons
Finding the number of bits whose states
D
FR
SM
SR
16-bit instruction
AS
AS
Function
are ON
E
K
16#
"$"
32-bit instruction
AS
6 - 3 5 7
F
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents