Insert (Insert Characters In A Character String) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

8.2.4.6

INSERT (Insert characters in a character string) instruction

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

Advertisement

Table of Contents
loading

Table of Contents