STRING_TO_WORD_STEPSAVER

STRING (hexadecimal format right-justified) into WORD

This function converts the string with the maximum possible number of characters that are right aligned in hexadecimal format into a value of the data type WORD.

Parameters

Input

Unnamed input (STRING)

input data type

Output

Unnamed output (WORD)

Conversion result

Remarks

The basic instruction F72_A2HEX is used. The PLC delivers an operation error especially when a character appears that is not a hexadecimal number “0 - 9" or "A-F”.

Acceptable Format for STRING[4]: 'Hex1Hex2Hex3Hex4' e.g. perhaps 'AFFE'

Acceptable characters:

Example with and without EN/ENO:

Input

Defined as

Results in

'D'

STRING[1]

16#D

'CD'

STRING[2]

16#CD

'BCD'

STRING[3]

16#BCD

'ABCD'

STRING[4]

16#ABCD

'0ABCD'

STRING[5]

16#ABCD

'00ABCD'

STRING[6]

16#ABCD

Related topics:

Modified on: 2019-01-24Feedback on this pagePanasonic hotline