BCD_TO_INT (FUN)¶
FUNCTION BCD_TO_INT : INT
Converts one byte in BCD format into an INT value
Example in ST:
i := BCD_TO_INT(73); (* Result is 49 *)
k := BCD_TO_INT(151); (* Result is 97 *)
l := BCD_TO_INT(15); (* Output -1, because it is not in BCD format *)
- InOut:
Scope
Name
Type
Comment
Return
BCD_TO_INT
INT
Value as INT for the input
B
Input
B
BYTE
Value in BCD code. If the value is not in the BCD format, then the output is -1.