TO_BCD_DWORD
PROGRAM TO_BCD_DWORD_DEMO VAR D: DWORD; U: UDINT; END_VAR D:= TO_BCD_DWORD(IN1:=U); END_PROGRAM
The function converts any integer number (ANY_INT) to a binary-coded decimal bit array (DWORD). For example, 36 is converted to 2#0011_0110 (54 decimal).
Input | Type | Description |
IN1 | ANY_INT | Input value |
Output | Type | Description |
⇒ | DWORD | Output value |