Conversion instructions
652
Part III FP Instructions
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable Enable is set to TRUE, the function is executed. The decimal value in
DINT_input is converted to a BCD hexadecimal value and stored in the variable BCD_output. You
may also assign a decimal, binary (prefix 2#), or hexadecimal (prefix 16#) value directly at the
contact pin for s.
LD
ST
When programming with structured text, enter the following:
IF Enable THEN
F82_DBCD(DINT_input, BCD_output);
END_IF;