Conversion instructions
156
Part II IEC Instructions
STRING_TO_INT_
STEPSAVER
STRING (Decimal Format right-justified) to INTEGER
The basic instruction F76_A2BIN (see page 637) with approx. 7 steps is used. The PLC delivers an
ope
ration error e
specially 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
Number
Decimal numbers "0“ - "9“
PLC types
Availability of STRING_TO_INT_STEPSAVER (see page 1331)
Data type Comment
STRING Input variable
INT Output variable
Description
This function converts a right-justifed decimal number in a string to a value of the data type INT.
Example
Data types