AToH
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
IN |
STRING |
|
|
|
String representing an integer in hexadecimal format. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
DINT |
|
|
Integer represented by the string. |
Remarks
- This function is case insensitive.
- The result is 0 (zero) for an empty string.
- The conversion stops before the first invalid character.
Truth Table
IN |
Q |
---|---|
'' |
0 |
'12' |
18 |
'a0' |
160 |
'A0zzz' |
160 |
FBD Language Example
FFLD Language Example
- In the FFLD Language, the operation is executed only if the input rung (EN) is TRUE.
- The output rung (ENO) keeps the same value as the input rung.
IL Language Example
- In the IL Language, the first input must be loaded before the function call.
Op1: LD IN
ATOH
ST Q
ST Language Example
Q := ATOH (IN);
See Also