Examples of S_CONV value to string conversion
Data type
UInt
UInt
UDInt
Real
Real
Real
Examples of STRG_VAL conversion
IN string
"123"
"-00456"
"123.45"
"+2345"
"00123AB"
"123"
"-00456"
"+00456"
"123.45"
"123.45"
"123,45"
"123,45"
".00123AB"
"1.23e-4"
"1.23E-4"
"1.23E-4"
"12,345.67"
"12,345.67"
"3.4e39"
"-3.4e39"
"1.1754943e-38"
(and smaller)
"12345"
"A123"
""
"++123"
"+-123"
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
IN value
123
0
12345678
-INF
+INF
NaN
FORMAT
OUT data type
(W#16#....)
0000
Int/DInt
0000
Int/DInt
0000
Int/DInt
0000
Int/DInt
0000
Int/DInt
0000
Real
0001
Real
0001
Real
0000
Real
0001
Real
0000
Real
0001
Real
0001
Real
0000
Real
0000
Real
0002
Real
0000
Real
0001
Real
0002
Real
0002
Real
0002
Real
N/A
SInt
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Programming instructions
6.2 Extended instructions
OUT string
"123"
"0"
"12345678"
"INF"
"INF"
"NaN"
OUT value
123
-456
123
2345
123
123.0
-456.0
456.0
123.45
12345.0
12345.0
123.45
123.0
1.23
1.23
1.23E-4
12345.67
12.345
+INF
-INF
0.0
0
0
0
0
0
ENO
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
ENO
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
143