EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 352

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
352 System Manual, V4.2, 09/2016, A5E02486680-AK
The FORMAT parameter for the VAL_STRG instruction is defined below. The unused bit
positions must be set to zero.
Table 9- 28 Format of the VAL_STRG instruction
Bit
16
Bit 8
Bit 7
Bit 0
0
0
0
0
0
0
0
0
0
0
0
0
0
s
f
r
s = Number sign character
1= use sign character "+" and "
-"
0 = use sign character "-" only
f = Notation format
1= Exponential notation
0 = Fixed point notation
r = Decimal point format
1 = "," (comma character)
0 = "." (period character)
Table 9- 29 Values of the FORMAT parameter
FORMAT (WORD)
Number sign character
Notation format
Decimal point representation
W#16#0000
"-" only Fixed point
"."
W#16#0001
","
W#16#0002
Exponential
"."
W#16#0003
","
W#16#0004
"+" and "-" Fixed Point
"."
W#16#0005
","
W#16#0006 Exponential "."
W#16#0007
","
W#16#0008 to W#16#FFFF Illegal values
Parameter OUT string format rules:
Leading space characters are added to the leftmost part of the string when the converted
string is smaller than the specified size.
When the FORMAT parameter sign bit is FALSE, unsigned and signed integer data type
values are written to the output buffer without the leading "+" sign. The "-" sign is used if
required.
<leading spaces><digits without leading zeroes>'.'<PREC digits>
When the sign bit is TRUE, unsigned and signed integer data type values are written to
the output buffer always with a leading sign character.
<leading spaces><sign><digits without leading zeroes>'.'<PREC digits>
When the FORMAT is set to exponential notation, Real data type values are written to the
output buffer as:
<leading spaces><sign><digit> '.' <PREC digits>'E' <sign><digits without leading zero>

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals