WORD_TO_HEXSTR

WORD_TO_HEXSTR 1:

This function converts a decimal number into a hexadecimal string (base 16).

WORD_TO_HEXSTR 2: Return value

Name

Type

Description

WORD_TO_HEXSTR

T_MaxString

 

WORD_TO_HEXSTR 3: Inputs

VAR_INPUT
    in         : WORD;
    iPrecision : INT;
    bLoCase    : BOOL := FALSE;
END_VAR

Name

Type

Description

in

WORD

The decimal number to be converted.

iPrecision

INT

Minimum number of displayed digits. If the actual number of significant digits is less than the iPrecision parameter, the resulting string is filled with zeros from the left. If the number of significant digits is greater than the iPrecision parameter, the resulting string is not truncated! If the iPrecision parameter and the in parameter have the value zero, the resulting string is an empty string.

bLoCase

BOOL

This parameter determines whether lower or upper case letters are used in the conversion. FALSE => "ABCDEF", TRUE => "abcdef".

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, Arm®)

Tc2_Utilities (System)