EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 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
Page #209 background imageLoading...
Page #209 background image
Program instructions
7.5 Convert
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
209
Integer to string conversion
LAD / FBD
STL
Description
ITS IN, OUT, FMT
The Integer to String instruction converts an integer word IN to an ASCII
string with a length of 8 characters. The format (FMT) assigns the conver-
sion precision to the right of the decimal, and whether the decimal point is
to be shown as a comma or a period. The resulting string is written to 9
consecutive bytes starting at OUT.
Non-fatal error conditions with ENO = 0
SM bits affected
0006H indirect address
0091H operand out of range
Illegal format (nnn > 5)
FMT bit is not zero for the four most signif-
icant bits of the FMT byte
None
Input / output
Data type
Operand
IN INT IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Con-
stant
FMT
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
OUT
STRING
VB, LB, *VD, *LD, *AC
The length of the output string is always 8 characters. The number of digits to the right of the
decimal point in the output buffer is assigned by the nnn field. The valid range of the nnn
field is 0 to 5. If you assign 0 digits to the right of the decimal point, then the value is
converted without a decimal point. For values of nnn greater than 5, the output is a string of
8 ASCII space characters. The c bit specifies the use of either a comma (c=1) or a decimal
point (c=0) as the separator between whole number and fraction. The most significant 4 bits
of the format must be zero.
The following figure also shows examples of values that are formatted using a decimal point
(c= 0) with three digits to the right of the decimal point (nnn = 011). The value at OUT is the
length of the string stored in the next byte addresses.
FMT parameter for the integer to string instruction

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals