Hide thumbs Also See for S7-1200:
Table of Contents
Table 8- 33
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"
The following examples of VAL_STRG conversions are based on an OUT string initialized as
follows:
"
Current Temp = xxxxxxxxxx C
where the "
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Examples of STRG_VAL conversion
FORMAT
(W#16#....)
0000
0000
0000
0000
0000
0000
0001
0001
0000
0001
0000
0001
0001
0000
0000
0002
0000
0001
0002
0002
0002
N/A
N/A
N/A
N/A
N/A
"
" character represents space characters allocated for the converted value.
x
OUT data type
OUT value
Int or DInt
123
Int or DInt
-456
Int or DInt
123
Int or DInt
2345
Int or DInt
123
Real
123.0
Real
-456.0
Real
456.0
Real
123.45
Real
12345.0
Real
12345.0
Real
123.45
Real
123.0
Real
1.23
Real
1.23
Real
1.23E-4
Real
12345.67
Real
12.345
Real
+INF
Real
-INF
Real
0.0
SInt
0
N/A
0
N/A
0
N/A
0
N/A
0
Extended instructions
8.2 String and character
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
301
Table of Contents
loading

Table of Contents