Chapter 22
String manipulation instructions
INSERT
Parameter
EN
IN
Str
Pos
INSERT
ENO
602
INSERT inserts sub-strings at user-defined positions within strings.
Arguments
Parameter Type
Data Type
Input
BOOL
Input
STRING
Input
STRING
Input
DINT
Output
STRING
Output
BOOL
INSERT function language examples
Function block diagram
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
Description
Function enable.
When EN = TRUE, insert sub-strings in a string.
When EN = FALSE, no operation.
Initial string.
String to be inserted.
Position of the insertion
the insertion is done before the position
(first valid position is 1).
Modified string. Can be:
• empty string if Pos <= 0
• concatenation of both strings if Pos is greater than the length of the IN
string
Enable out.