Conversion instructions
649
Part III FP Instructions
F81_BIN
4-digit BCD -> 16-bit BIN conversion
·········
15
000
12
0
11
000
8
0
7
000
4
0
3
111
0
1
·········
15
000
12
0
11
000
8
0
7
000
4
1
3
010
0
1
0
015
15
Source [s]: 16#15 (BCD)
Destination [d]: 15
Conversion (to binary data)
Decimal
Binary data
Bit position
BCD Hex
code
BCD code
Bit position
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.
See also:
BCD data
PLC types
Availability of F81_BIN (see page 1326)
Variable Data type Function
s WORD 16-bit area for 4-digit BCD data (source)
d ANY16 16-bit area for storing 16-bit binary data (destination)
For Relay T/C Register Constant
s WX WY WR WL SV EV DT LD FL dec. or hex.
d - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
the data specified by s is not BCD data.
Description
Converts the BCD code that expresses 4-digit decimals specified by s to 16-bit binary data if the
trigger EN is in the ON-state. The converted result is stored in the area specified by d.
Data types
Operands
Error flags