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