Conversion instructions
179
Part II IEC Instructions
STRING_TO_DINT_
STEPSAVER
STRING (Decimal Format right-justified) to DOUBLE INTEGER
The basic instruction F78_DA2BIN (see page 643) with approx. 11 steps is used. The PLC delivers
an ope
ration error es
pecially when a character appears that is not a decimal number “0 - 9”, not a
“+” or “-“ or not a space.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Acceptable Format:
'[Space][Sign][Decimal number]' e.g. ' 123456'
Acceptable characters:
Space Space “ “
Signs Plus "+“ and minus "-"
Decimal
Numbers
Decimal numbers "0“ - "9“
PLC types
Availability of STRING_TO_DINT_STEPSAVER (see page 1331)
Data type Comment
STRING Input variable
DINT Output variable
Description
This function converts a right-justifed decimal number in a string to a value of the data type DINT.
Example
Data types