CCS Standardfunction   StrToHexString [String]
 

StrToHexString [String]

String [Str]

Format [INT]

Description of Function

Converts a string to a string consisting of the corresponding ASCII values in hexadecimal format.

Testing Points

None

Parameters

String

String (or variable containing a string) to be converted into its ASCII values.

Format

Specifies the format in which the string specified by String is to be returned. The following values are allowed (other formats are conceivable in the future):

0 Æ HexString (the ASCII value of each character is represented as a hexadecimal number with 2 digits).

Example:

Result [String]

StrToHexString

A,0

41

StrToHexString

Hallo,0

48616C6C6F

StrToHexString

0123, 0

30313233

Converting the 10-digit BOSCH no. 1 234 567 890 whose digits are stored as hexadecimal numbers.

Byte 1 = 0001 0010 (12 Hex); Byte 2 = 0011 0100 (34 Hex); Byte 3 = 0101 0110 (56 Hex)

Byte 4 = 0111 1000 (78 Hex); Byte 5 = 1001 0000 (90 Hex)

Result

B_Nr=BlockStr

1,5

n4nnn [String]

StrToHexString

B_Nr, 0

1234567890 [String]