Siemens SIMATIC S7 System Manual page 148

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Programming instructions
6.2 Extended instructions
DELETE instruction
Parameter
IN
L
P
OUT
DELETE (Delete substring) deletes L characters from string IN. Character deletion starts at
character position P (inclusive), and the remaining substring is provided at parameter OUT.
● If L is equal to zero, then the input string is returned in OUT.
● If the sum of L and P is greater than the length of the input string, then the string is
The following table shows the condition codes for the instruction.
ENO
1
0
INSERT
Parameter
IN1
IN2
P
OUT
INSERT (Insert substring) inserts string IN2 into string IN1. Insertion begins after the
character at position P. The following table shows the condition codes for the instruction.
ENO
1
0
148
Parameter
Data type
type
IN
String
IN
Int
IN
Int
OUT
String
deleted to the end.
Condition
No errors detected
P is greater than current length of IN
L is less than 0, or P is less than or equal to 0
Resulting string after characters are deleted is
larger than maximum length of OUT string
Parameter
Data type
type
IN
String
IN
String
IN
Int
OUT
String
Condition
No errors detected
P is greater than length of IN1
P is less than or equal to 0
Description
Input string
Number of characters to be deleted
Position of the first character to be deleted: The first
character of the IN string is position number 1
Output string
OUT
Valid characters
IN is copied to OUT with no characters
deleted
Current length is set to 0
Resulting string characters are copied
until the maximum length of OUT is
reached
Description
Input string 1
Input string 2
Last character position in string IN1 before the insertion
point for string IN2. The first character of string IN1 is
position number 1.
Result string
OUT
Valid characters
IN2 is concatenated with IN1
immediately following the last IN1
character
Current length is set to 0
System Manual, 11/2009, A5E02486680-02
S7-1200 Programmable controller

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents