BCD_TO_ULINT block
Short summary
Name |
BCD_TO_ULINT |
→POU type |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
Available since |
version 1.22.0 (for logi.CAD 3) |
Functionality
The block converts a binary coded decimal value (a →BCD-value) into a decimal value of data type ULINT.
At input IN, connect the BCD-value that should be converted. If it is not a valid BCD-value, the result of the block is not defined.
Inputs, return value
|
Identifier |
Description |
|
Inputs: |
IN |
BYTE, WORD, DWORD or LWORD |
BCD input value |
Return value: |
– |
ULINT |
|
Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.
Example for usage within ST-editor
PROGRAM Test
VAR
result : ULINT;
END_VAR
result := BCD_TO_ULINT(IN :=
16
#
12345
); (* The variable
'result'
evaluates to
'12345'
. *)
END_PROGRAM
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.