EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 348

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
348 System Manual, V4.2, 09/2016, A5E02486680-AK
S_CONV (value to string conversion)
Table 9- 20 Data types (value to string)
Parameter and type
Data type
Description
IN IN String, WString, Char, WChar, SInt, Int, DInt, USInt, UInt, UDInt,
Real, LReal
Input number value
OUT
OUT
String, WString
Output character string
An integer, unsigned integer, or floating point value IN is converted to the corresponding
character string at OUT. The parameter OUT must reference a valid string before the
conversion is executed. A valid string consists of a maximum string length in the first byte,
the current string length in the second byte, and the current string characters in the next
bytes. The converted string replaces characters in the OUT string starting at the first
character and adjusts the current length byte of the OUT string. The maximum length byte of
the OUT string is not changed.
How many characters are replaced depends on the parameter IN data type and number
value. The number of characters replaced must fit within the parameter OUT string length.
The maximum string length (first byte) of the OUT string should be greater than or equal to
the maximum expected number of converted characters. The following table shows S_CONV
value to string conversion examples:
Output String format rules:
Values written to parameter OUT do not use a leading "+" sign.
Fixed-point representation is used (no exponential notation).
The period character "." is used to represent the decimal point when parameter IN is the
Real data type.
Values are right-justified in the output string and are preceded by space characters that
fill empty character positions.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals