2-533
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Text String Instructions
2
INSERT
INSERT
The INSERT instruction inserts a text string into another text string.
The INSERT instruction inserts insertion string In2 into original string In1 at insertion start position P. A
NULL character is placed at the end of insertion result Out.
Instruction Name FB/FUN Graphic expression ST expression
INSERT Insert String FUN Out:=INSERT(In1, In2, P);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 Original
string
Input
Text string into which to
insert string
Depends on data type.
---
''
In2 Insert
string
Text string to insert
P Insertion
start posi-
tion
Insertion start position 0 to 1985 0
Out Insertion
result
Output Text string after insertion Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 OK
In2 OK
POK
Out OK
Function
(@)INSERT
EN ENO
In1 Ou
In2
P