EasyManua.ls Logo

Siemens S7-1200 - Page 301

Siemens S7-1200
1028 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
8.2 String and character
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
301
Table 8- 33 Examples of STRG_VAL conversion
IN string
FORMAT
(W#16#....)
OUT data type
OUT value
ENO
"123"
0000
Int or DInt
123
TRUE
"-00456"
0000
Int or DInt
-456
TRUE
"123.45"
0000
Int or DInt
123
TRUE
"+2345"
0000
Int or DInt
2345
TRUE
"00123AB"
0000
Int or DInt
123
TRUE
"123"
0000
Real
123.0
TRUE
"-00456"
0001
Real
-456.0
TRUE
"+00456"
0001
Real
456.0
TRUE
"123.45"
0000
Real
123.45
TRUE
"123.45"
0001
Real
12345.0
TRUE
"123.45"
0000
Real
12345.0
TRUE
"123.45"
0001
Real
123.45
TRUE
".00123AB"
0001
Real
123.0
TRUE
"1.23e-4"
0000
Real
1.23
TRUE
"1.23E-4"
0000
Real
1.23
TRUE
"1.23E-4"
0002
Real
1.23E-4
TRUE
"12,345.67" 0000 Real 12345.67 TRUE
"12,345.67"
0001
Real
12.345
TRUE
"3.4e39" 0002 Real +INF TRUE
"-3.4e39"
0002
Real
-INF
TRUE
"1.1754943e-38"
(and smaller)
0002 Real 0.0 TRUE
"12345"
N/A
SInt
0
FALSE
"A123"
N/A
N/A
0
FALSE
""
N/A
N/A
0
FALSE
"++123"
N/A
N/A
0
FALSE
"+-123"
N/A
N/A
0
FALSE
The following examples of VAL_STRG conversions are based on an OUT string initialized as
follows:
"
Current Temp = xxxxxxxxxx C"
where the "
x" character represents space characters allocated for the converted value.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals