Panasonic FP Series Programming Manual page 246

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

DINT_TO_BCD_DWORD
DINT_TO_BCD_DWORD converts a value of the data type DINT into a BCD value of the data type
Description
DWORD.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Availability of DINT_TO_BCD_DWORD (see page 1319)
PLC types
The value for the input variable should be between 0 and 999,999,999.
Data types
Data type
DINT
BCD_DWORD
In this example, the same POU header is used for all programming languages. For an example
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.
This example uses variables. You can also use a constant for the input variable.
Body
DINT_value of the data type DOUBLE INTEGER is converted into a BCD value of the data type
DOUBLE WORD. The converted value is written to BCD_value_32bit.
LD
ST
When programming with structured text, enter the following:
BCD_value_32bit:=DINT_TO_BCD_DWORD(DINT_value);
DOUBLE INTEGER into BCD DOUBLE WORD
I/O
Function
Input
input data type
Output
conversion result
Conversion instructions
245

Advertisement

Table of Contents
loading

Table of Contents