STRING_TO_DWORD_STEPSAVER

STRING (hexadecimal format right-justified) into DOUBLE 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 DWORD.

Parameters

Input

Unnamed input (STRING)

Input data type

Output

Unnamed output (DWORD)

Conversion result

Remarks

Acceptable Format for STRING[8]:

'Hex1Hex2Hex3Hex4Hex5Hex6Hex7Hex8' e.g. '001AAFFE'

Acceptable characters:

Hex1–Hex8: Hexadecimal numbers in the range "0–9“ or "A–F“ (not "a–f").

Example



Input

Defined as

Results in

'FE'

STRING[2]

16#FE

'EFFE'

STRING[4]

16#EFFE

'CDEFFE'

STRING[6]

16#CDEFFE

'ABCDEFFE'

STRING[8]

16#ABCDEFFE

'00ABCDEFFE'

STRING[10]

16#ABCDEFFE

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”.

Related topics:

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