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

Hide thumbs Also See for S7-1200:
Table of Contents
Extended instructions
8.2 String and character
8.2.4.5

DELETE (Delete characters in a character string) instruction

Table 8- 58
Delete substring instruction
LAD / FBD
SCL
out := DELETE(in, L, p);
Table 8- 59
Data types for the parameters
Parameter and type
IN
IN
L
IN
P
IN
OUT
OUT
Table 8- 60
ENO status
ENO
Condition
1
No errors detected
0
P is greater than current length of IN
Resulting string after characters are deleted is larger than maximum length
of OUT string
L is less than 0, or P is less than or equal to 0
Current length of IN exceeds maximum length of IN, or current length of
OUT exceeds maximum length of OUT
Maximum length of IN or OUT does not fit within allocated memory
Maximum length of IN or OUT is 0 or 255
310
Description
Deletes L characters from string IN. Character deletion starts at
character position P (inclusive), and the remaining substring is
provided at parameter OUT.
Data type
Description
String
Input string
Int
Number of characters to be deleted
Int
Position of the first character to be deleted: The first character of
the IN string is position number 1
String
Output string
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 deleted to the end.
System Manual, 03/2014, A5E02486680-AG
OUT
Valid characters
IN is copied to OUT with no
characters deleted
Resulting string characters are
copied until the maximum length
of OUT is reached
Current length is set to 0
S7-1200 Programmable controller
Table of Contents
loading

Table of Contents