dintToHex (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

5.08 / 1.52.00


dintToHex will convert a number (DINT) to a hex-string.

 

Input:

v : DINT

Number to convert.

 

Returns: STRING

A string containing the hexadecimal representation of v.

 

Declaration:

FUNCTION dintToHex : STRING;
VAR_INPUT
   v : DINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
VAR
   result : STRING;
END_VAR;
 
PROGRAM test;
 
BEGIN
   ...
   result := dintToHex(v:=20000000);
   // result will contain "01312D00" after the call
   ...
END;
 
END_PROGRAM;