Function - Converts string to integer using hexadecimal basis.

Inputs

Input

Data type

Description

IN

STRING

String representing an integer in hexadecimal format.

Outputs

Output

Data type

Description

Q

DINT

Integer represented by the string.

Truth table (examples)

IN

Q

''

0

'12'

18

'a0'

160

A0zzz'

160

Remarks

The function is case insensitive. The result is 0 for an empty string. The conversion stops before the first invalid character. In LD 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.

ST Language

Q := ATOH (IN);

FBD Language

Fixed_Image

LD Language

The function is executed only if EN is TRUE.
ENO keeps the same value as EN.

Fixed_Image

Fixed_Image See also

HTOA


Created with the Personal Edition of HelpNDoc: Effortlessly Convert Your Word Doc to an eBook: A Step-by-Step Guide