INSERT (insert string)
The INSERT instruction inserts sub-strings at user-defined positions within strings.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
INSERT

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | Instruction enable.
Applies to ladder diagram programs. |
IN | Input | STRING | Initial string. |
Str | Input | STRING | String to be inserted. |
Pos | Input | DINT | Position of the insertion is done before the position (first valid position is 1). |
INSERT | Output | STRING | Modified string. Can be:
|
ENO | Output | BOOL | Enable output. Applies to ladder diagram programs. |
INSERT examples
INSERT function block diagram example

INSERT ladder diagram example

INSERT structured text example

(* ST Equivalence: *) MyName := INSERT ('Mr JONES', 'Frank ', 4); (* MyName is 'Mr Frank JONES' *)
Results

Provide Feedback