String Delete (DELETE)
    The DELETE instruction removes ASCII characters from a string.
The DELETE instruction deletes (removes) one or more characters from the Source and places the remaining characters in the Destination.
- The Start position and Quantity define the characters to remove.
- Unless Source A and the Destination are the same tag, Source A remains unchanged.
Available Languages
Ladder Diagram
_v1.png/_jcr_content/renditions/original)
FactoryTalk Design Studio
 DSL - Ladder DiagramDELETE(Source,Qty,Start,Dest);
Operands
There are data conversion rules for mixed data types within an instruction. See Data Conversion.
Ladder Diagram
| Operand | Type | Format | Description | Notes | 
|---|---|---|---|---|
| Source | ANY_STRING | tag | The tag that contains the string from which you want to delete characters | String types are: 
 | 
| Quantity | SINT
                   INT
                       DINT | immediate
                   tag | The number of characters to delete | The Start plus the Quantity must be less than or equal to the length of the Source plus 1. | 
| Start | SINT
                   INT
                       DINT | immediate
                   tag | The position of the first character to delete | Enter a number between 1 and the DATA size of the Source. | 
| Destination | String type | tag | The tag to store the result | 
Affects Math Status Flags
No
Major/Minor Faults
| A minor fault will occur if: | Fault Type | Fault Code | 
|---|---|---|
| The LEN value of the Source string tag is greater than the DATA size of the Source string tag. | 4 | 51 | 
| The length of output string is larger than the DATA size of the destination string tag. | 4 | 52 | 
| The Start or Quantity value is invalid. | 4 | 56 | 
See common-attributes.html for operand-related faults.
Execution
Ladder Diagram
| Condition/State | Action | 
|---|---|
| Prescan | N/A | 
| Rung-condition-in is false | N/A | 
| Rung-condition-in is true | The instruction executes. | 
| Postscan | N/A | 
Provide Feedback