DELETE (delete sub-string)
The DELETE instruction deletes characters from a string.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
DELETE

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | Instruction enable.
Applies to ladder diagram programs. |
IN | Input | STRING | Any non-empty string. |
NbC | Input | DINT | Number of characters to be deleted. |
Pos | Input | DINT | Position of the first deleted character (first character of the string has position 1). |
DELETE | Output | STRING | Output is:
|
ENO | Output | BOOL | Enable output. Applies to ladder diagram programs. |
DELETE examples
DELETE function block diagram example

DELETE ladder diagram example

DELETE structured text example

(* ST Equivalence: *) complete_string := INSERT (’ABCD ’, ’EFGH’, 5); (* complete_string is 'ABCDEFGH ' *) sub_string := DELETE (complete_string, 4, 3); (* sub_string is 'ABGH '*)
Results

Provide Feedback