EasyManua.ls Logo

Siemens SIMATIC S7-1200

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
346 System Manual, V4.2, 09/2016, A5E02486680-AK
9.2
String and character
9.2.1
String data overview
String data type
String data is stored as a 2-byte header followed by up to 254 character bytes of ASCII
character codes. A String header contains two lengths. The first byte is the maximum length
that is given in square brackets when you initialize a string, or 254 by default. The second
header byte is the current length that is the number of valid characters in the string. The
current length must be smaller than or equal to the maximum length. The number of stored
bytes occupied by the String format is 2 bytes greater than the maximum length.
Initialize your String data
String input and output data must be initialized as valid strings in memory, before execution
of any string instructions.
Valid String data
A valid string has a maximum length that must be greater than zero but less than 255. The
current length must be less than or equal to the maximum length.
Strings cannot be assigned to I or Q memory areas.
For more information see: Format of the String data type (Page 130).
9.2.2
S_MOVE (Move character string)
Table 9- 16 String move instruction
LAD / FBD
SCL
Description
out := in;
Copy the source IN string to the OUT location. S_MOVE execution does not affect
the contents of the source string.
Table 9- 17 Data types for the parameters
Parameter
Data type
Description
IN
String
Source string
OUT
String
Target address
If the actual length of the string at the input IN exceeds the maximum length of a string
stored at output OUT, then the part of the IN string which can fit in the OUT string is copied.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals