StringToNumber
Contents

1.Description

The module converts a text into an integer value (integer) and into a floating point value (float). For this, a decimal separator has to be defined (Input 2). If the conversion is not possible, a 1 is sent at the error output. If no error occurs, the output sends a zero. An error occurs if the input text contains characters other than numbers and the defined decimal separator.
No output occurs if the value changes at Input 2 (definition of the decimal separator)!
Note
This module behaves as described earlier in the documentation of the module StrToFloat (17755). The documentation of the module StrToFloat (17755) was adapted.

2.Inputs

No.NameInitialisationDescription
1E1 Value"0"
Input value as text
2E2 Decimal separator"."
Decimal separator

3.Outputs

No.NameInitialisationSBCDescription
1A1 Int0s
Integer value of value 1
2A2 Float0s
Floating point value of value 1
3A3 Error0s
Error output
s = send, sbc = send by change

4.Other

Recalculation during start:No
Module is retentive:No
Internal designation:17855
Category:Converter

5.Similar functions

Status machine, 1 outp
Status machine, 8 outp
ShiftLeft
ShiftRight
BitCutter
StringToFloat
DecToHex
TextToBase64
IntToString
StringToHex
HexToString
ChrToASCII
2ByteTo16Bit
4ByteTo32Bit