STRING_TO_DINT

STRING (decimal format) into DOUBLE INTEGER

This function converts a string in decimal formal into a value of the data type DINT.

At first the string is converted into a value of the data type STRING[32]. Finally this is converted into a value of the data type DINT in a subprogram of approximately 270 steps, which is also used by the functions STRING_TO_INT, STRING_TO_WORD, STRING_TO_DINT and STRING_TO_DWORD.

Parameters

Input

Unnamed input (STRING)

Input data type

Output

Unnamed output (DINT)

Conversion result

Remarks

If the required data type is supported, we recommend using the overloaded instruction TO_DINT

Acceptable format: '[Space][Sign][Decimal number][Space]' e.g. ' 123456 '

Acceptable characters:

The analysis ends with the first non-decimal number.

Example with and without EN/ENO:

Related topics:

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