DVP-15MC Series Motion Controller Operation Manual
8-286
Function Explanation
The INSERT instruction inserts the In2 string into the In1 string and the new string is output to Out.
The insertion position is between the position specified by P and the position specified by P+1 of
the characters in In1. If P =0, the In2 string is inserted at the start of the In1 string. The insertion
way is illustrated as below.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
Programming Example
Insert_In1 is ’AaBbCcDd’, Insert_In2 is ’Ee’ and Insert_P=2. When Insert_EN is TRUE, Out1
is ’AaEeBbCcDd’.
The variable table and program
Insert_P
UINT
Out1 STRING
‘AaEeBbCcDd’
In1=ABCDEFGH
P=0
Out:
abcABCDEFGH
ABCDEFGH
Insert In2
INSERT
In2=abc
P=2
Out:
ABab cCDEFGH
ABCDEFGH
Insert In2
INSERT
1
Insert
EN ENO
In1 Out
P
In2
Insert_EN
Insert_In1
Insert_P
Insert_In2
Out1