User manual

Highlevel Instructions
3 300
Outline Counts the number of bits in the on (1) state in specified 32-bit data.
For the FP0R/FPΣ/FPX/FP0/FPe, the P type highlevel instruction
“P136 (PDBCU)” is not available.
Program example
Ladder
Diagram
Boolean
Ladder Diagram
Address Instruction
10 F136 DBCU , DT10 , DT20
S
D
Trigger
R0
10
11
ST R 0
F136 (DBCU)
DT 10
DT 20
S 32-bit equivalent constant or lower 16-bit area of 32-bit data (source)
D 16-bit area (destination) for storing the number of bits in the on (1) state
Operands
Operand
Relay Timer/Counter Register
Index
register
Constant
Inde
x
Operand
WX WY WR
WL
(*1)
SV EV DT
LD
(*1)
FL
(*2)
IX
(*3)
IY K H
Index
modifier
S A A A A A A A A A A N/A A A A
D N/A A A A A A A A A A N/A N/A N/A A
(*1) This cannot be used with the FP0 and FPe.
(*2) This cannot be used with the FP0, FPe, FP0R, FPΣ, FPX.
(*3) With the FP0R, FPΣ,FPX, FP2, FP2SH, and FP10SH, this is I0 to IC.
Explanation of example
Counts the number of bits in the on (1) state in data register DT11 and DT10 when trigger R0 turns on. The
number of on (1) bits is stored in data register DT20.
····
Bit position
·····
Binary data
15
001
12
1
11
001
8
0
7
000
4
0
3
000
0
1
·········
15
000
12
0
11
000
8
1
7
001
4
1
3
011
0
0
DT11 DT10
The number of on (1) bits is “9”.
The K9 is stored in data register DT20 when R0 turns on.
F136
P136
(PDBCU)
(DBCU)
Number of on (1) bits in 32-bit data
A: Available
N/A: Not Available