String Delete (Delete); Relay Ladder; Structured Text - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 18
ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)

String Delete (DELETE)

DELETE
String Delete
Source
Qty
Start
Dest
Operand
Type
Source
string
Quantity
SINT
INT
DINT
Start
SINT
INT
DINT
Destination
string
DELETE(Source,Qty,Start,
Dest);
Arithmetic Status Flags:
Fault Conditions:
Type
Code
Cause
4
51
The LEN value of the string tag is greater
than the DATA size of the string tag.
4
56
The Start or Quantity value is invalid.
612
The DELETE instruction does not automatically remove all ASCII characters from a
string. An algorithm determines which characters in the string are removed depending on
the starting position, quantity, and size of the Source.
Operands:

Relay Ladder

?
The DELETE instruction does the following:
??
?
• Copies the string from the Source to the Destination, ignoring deleted
??
?
characters and updating the Destination string with the number of
??
?
characters copied
??
• Updates the length of the Destination string by the position of characters
in the Source string and the number of characters being deleted
• Leaves the Source unchanged unless the Source and the Destination are the
same tag
Format
Tag
Immediate
Tag
Immediate
Tag
Tag

Structured Text

The operands are the same as those for the relay ladder DELETE instruction.
Not affected
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Enter
Tag that contains the string
from which you want to delete
characters
Number of characters to
delete
Position of the first character
to delete
Tag to store the result
Recovery Method
1. Check that no instruction is writing to the LEN member of the string tag.
2. In the LEN value, enter the number of characters that the string contains.
1. Check that the Start value is between 1 and the DATA size of the Source.
2. Check that the Start value plus the Quantity value is less than or equal to the
DATA size of the Source.
Notes
String data types are:
·Default STRING data type
·Any new string data type that you create
The Start plus the Quantity must be less than or
equal to the DATA size of the Source.
Enter a number between 1 and the DATA size of the
Source.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents