EasyManuals Logo
Home>Allen-Bradley>Controller>Logix5000

Allen-Bradley Logix5000 Reference Manual

Allen-Bradley Logix5000
708 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
Page #612 background imageLoading...
Page #612 background image
612 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 18 ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)
String Delete (DELETE)
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
Structured Text
The operands are the same as those for the relay ladder DELETE instruction.
Arithmetic Status Flags: Not affected
Fault Conditions:
String Delete
Source ?
??
Qty ?
??
Start ?
??
Dest ?
??
DELETE
Operand Type Format Enter Notes
Source string Tag Tag that contains the string
from which you want to delete
characters
String data types are:
·Default STRING data type
·Any new string data type that you create
Quantity SINT
INT
DINT
Immediate
Tag
Number of characters to
delete
The Start plus the Quantity must be less than or
equal to the DATA size of the Source.
Start SINT
INT
DINT
Immediate
Tag
Position of the first character
to delete
Enter a number between 1 and the DATA size of the
Source.
Destination string Tag Tag to store the result
DELETE(Source,Qty,Start,
Dest);
Type Code Cause Recovery Method
4 51 The LEN value of the string tag is greater
than the DATA size of the string tag.
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.
4 56 The Start or Quantity value is invalid. 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.

Table of Contents

Other manuals for Allen-Bradley Logix5000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals