EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 354

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
9.2 String and character
S7-1200 Programmable controller
354 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 9- 31 Example of S_CONV string to value conversion
IN string
OUT data type
OUT value
ENO
"123"
Int or DInt
123
TRUE
"-00456" Int or DInt -456 TRUE
"123.45"
Int or DInt
123
TRUE
"+2345" Int or DInt 2345 TRUE
"00123AB"
Int or DInt
123
TRUE
"123"
Real
123.0
TRUE
"123.45"
Real
123.45
TRUE
"1.23e-4"
Real
1.23
TRUE
"1.23E-4"
Real
1.23
TRUE
"12,345.67"
Real
12345.67
TRUE
"3.4e39"
Real
3.4
TRUE
"-3.4e39"
Real
-3.4
TRUE
"1.17549e-38"
Real
1.17549
TRUE
"12345"
SInt
0
FALSE
"A123"
N/A
0
FALSE
""
N/A
0
FALSE
"++123"
N/A
0
FALSE
"+-123"
N/A
0
FALSE
Table 9- 32 Examples of S_CONV value to string conversion
Data type
IN value
OUT string
1
ENO
UInt
123
"xxx123"
TRUE
UInt
0
"xxxxx0"
TRUE
UDInt
12345678
"xxx12345678"
TRUE
Real
+9123.456
"xx+9.123456E+3"
TRUE
LReal +9123.4567890123 "xx+9.1234567890123
E+3"
TRUE
Real
-INF
"xxxxxxxxxxxINF"
FALSE
Real
+INF
"xxxxxxxxxxxINF"
FALSE
Real
NaN
"xxxxxxxxxxxNaN"
FALSE
1
The "x" characters represent space characters that fill empty positions in the right-justified field
that is allocated for the converted value.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals