10.2 BCU (ON Bits Count)
■
Ladder diagram
■
Available operation units (●: Available)
Operatio
n unit
bit US SS UL SL SF DF
i ● ●
■
List of operands
Operand Description
S Target device address or the constant (data format: according to the operation unit)
D Device address to store the result (data format: unsigned 16-bit integer)
■
Available devices (●: Available)
Operan
d
16-Bit device:
32-Bit
device:
(Note 1)
Integer
Real
numbe
r
St
rin
g
Index
modifie
r
(Note 2)
W
X
W
Y
W
R
W
L
W
S
S
D
D
T
L
D
U
M
WI
W
O
TS
C
S
TE
C
E
IX K U H SF
D
F
" "
S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
(Note 1) Cannot be specified when the operation unit is 16-bit integer (SS, US).
(Note 2) Only 16-bit devices, 32-bit devices, and integer constants can be modified. (Real number constants,
and character constants cannot be specified.)
■
Outline of operation
● This function counts the number of ON bits (bits whose value is 1) in the data specified by
[S], and stores the result in the device address specified by [D].
● The result is stored as an unsigned 16-bit integer.
10.2 BCU (ON Bits Count)
WUME-FP7CPUPGR-12 10-5