Conversion instructions
651
Part III FP Instructions
F82_DBCD
32-bit BIN -> 8-digit BCD conversion
·········
15
000
12
0
11
010
8
0
7
010
4
1
3
011
0
1
·········
15
011
12
1
11
001
8
0
7
100
4
0
3
000
0
1
7
281
·········
15
000
12
0
11
010
8
0
7
110
4
1
3
001
0
0
·········
15
000
12
1
11
011
8
1
7
001
4
1
3
000
0
0
1730
72811730
Source [s]: 72811730
Destination [d]: 16#72811730
Bit position
Bit position
BCD code
BCD Hex code
Binary data
Decimal
32-bit area
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 F82_DBCD (see page 1326)
Variable Data type Function
s ANY32 binary data (source), range: 0 to 99,999,999
d DWORD 32-bit area for 8-digit BCD code (destination)
For Relay T/C Register Constant
s DWX DWY DWR DWL DSV DEV DDT DLD DFL dec. or hex.
d - DWY DWR DWL DSV DEV DDT DLD DFL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
32-bit data specified by s outside the
range of 0 (16#0) to 99999999
(16#5F5E0FF) is converted.
Description
Converts the 32-bit binary data specified by s to the BCD code that expresses 8-digit decimals if
the trigger EN is in the ON-state. The converted data is stored in d. The binary data that can be
converted to BCD code are in the range of 0 (0 hex) to 99,999,999 (5F5E0FF hex).
Data types
Operands
Error flags