Panasonic FP Series Programming Manual page 544

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F135_BCU
Counts the number of bits in the ON state (1) in the 16-bit data specified by s if the trigger EN is in
Description
the ON-state.
The number of 1 (ON) bits is stored in the 16-bit area specified by d.
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Availability of F135_BCU (see page 1321)
PLC types
Data types
Variable
Data type
ANY16
s
INT
d
Operands
For
s
d
In this example the function has been programmed in ladder diagram (LD) and structured text
Example
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out.
LD
ST
When programming with structured text, enter the following:
IF
start
THEN
F135_BCU(checked_value1, output_value);
END_IF;
Number of ON bits in 16-bit data
Function
source
destination area for storing the number of bits in the ON (1)
state
Relay
-
WY
WR
WL
WX
WY
WR
WL
T/C
Register
SV
EV
DT
LD
FL
SV
EV
DT
LD
FL
Bitwise Boolean instructions
Constant
-
dec. or hex.
543

Advertisement

Table of Contents
loading

Table of Contents