EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 368

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
368 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 9- 65 Data types for the parameters
Parameter and type
Data type
Description
IN1
IN
String, WString
Input string
IN2 IN String, WString String of replacement characters
L
IN
Int
Number of characters to replace
P IN Int Position of first character to be replaced
OUT
OUT
String, WString
Result string
If parameter L is equal to zero, then the string IN2 is inserted at position P of string IN1
without deleting any characters from string IN1.
If P is equal to one, then the first L characters of string IN1 are replaced with string IN2
characters.
Table 9- 66 ENO status
ENO
Condition
OUT
1
No errors detected
Valid characters
0 P is greater than length of IN1 IN2 is concatenated with IN1 immediate-
ly following the last IN1 character
P points within IN1, but fewer than L characters remain in IN1 IN2 replaces the end characters of IN1
beginning at position P
Resulting string after replacement is larger than maximum length of
OUT string
Resulting string characters are copied
until the maximum length of OUT is
reached
Maximum length of IN1 is 0
IN2 characters are copied to OUT
L is less than 0, or P is less than or equal to 0
Current length is set to 0
Current length of IN1 exceeds maximum length of IN1, current
length of IN2 exceeds maximum length of IN2, or current length of
OUT exceeds maximum length of OUT
Maximum length of IN1, IN2 or OUT does not fit within allocated
memory range
Maximum length of IN1 or IN2 is 255, or maximum length of OUT is
0 or 255 (String data type)
Maximum length of IN1 or IN2 is 65534, or maximum length of OUT
is 0 or 65534 (WString data type)

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals