EasyManua.ls Logo

Siemens S7-1200 - INSERT (Insert Characters in a Character String) Instruction

Siemens S7-1200
1028 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
8.2 String and character
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
311
8.2.4.6
INSERT (Insert characters in a character string) instruction
Table 8- 61 Insert substring instruction
LAD / FBD
SCL
Description
out := INSERT(in1, in2, p);
Inserts string IN2 into string IN1. Insertion begins after the
character at position P.
Table 8- 62 Data types for the parameters
Parameter and type
Data type
Description
IN1
IN
String
Input string 1
IN2
IN
String
Input string 2
P IN Int Last character position in string IN1 before the insertion point for
string IN2
The first character of string IN1 is position number 1.
OUT
OUT
String
Result string
Table 8- 63 ENO status
ENO
Condition
OUT
1
No errors detected
Valid characters
0 P is greater than length of IN1 IN2 is concatenated with IN1
immediately following the last IN1
character
P is less than 0
Current length is set to 0
Resulting string after insertion is larger than maximum length of
OUT string
Resulting string characters are copied
until the maximum length of OUT is
reached
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 (invalid string)
Current length is set to 0
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

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals