Conversion instructions
167
Part II IEC Instructions
STRING_TO_UINT_
STEPSAVER
STRING (Decimal Format right-justified) to Unsigned INTEGER
The basic instruction F76_A2BIN (see page 637) with approx. 7 steps is used. The PLC issues an
ope
ration error e
specially if anything other than acceptable characters are used (see the following
table "Acceptable characters").
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_UINT_STEPSAVER (see page 1331)
Data type Comment
STRING Input
UINT Output
Description
STRING_TO_UINT_STEPSAVER converts a right-justifed decimal number in a string to a value of
the data type Unsigned INTEGER.
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
UINT_value:= STRING_TO_UINT_STEPSAVER(STRING_value);