HEXASCNIBBLE_TO_BYTE

This function converts the ASCII code of a hexadecimal half-byte character into the decimal value.
FUNCTION HEXASCNIBBLE_TO_BYTE : BYTE
VAR_INPUT
VAR_INPUT
asc : BYTE;
END_VAR
asc: Ascii-code of a hexadecimal half-byte character (Ascii code from: ‘0’ to ‘9’ or ‘a’ to ‘f’ or ‘A’ to ‘F’).
Return value | Meaning |
---|---|
0 to 15 | Successful, no error. |
255 | Error, wrong input parameter value. |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v2.11.0 Build >=2248 | PC or CX (x86, ARM) | TcUtilities.Lib |