sintToHex (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

5.08 / 1.52.00


sintToHex will convert a number (SINT) to a string.

 

Input:

v : SINT

Number to convert.

 

Returns: STRING

A string containing the hexadecimal representation of v.

 

Declaration:

FUNCTION sintToHex : STRING;
VAR_INPUT
   v : SINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
VAR
   result : STRING;
END_VAR;
 
PROGRAM test;
 
BEGIN
   ...
   result := sintToHex(v:=-128);
   // result will contain "80" after the call
   ...
END;
 
END_PROGRAM;