DVP15MC11T Operation Manual
Function Explanation
The REPLACE instruction replaces L characters starting from the number-P character of the In1 string by
inserting another string In2. And the replacement result is output to Out. The replacement process 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
The REPLACE_In1 string is ’AaBbCcDd’, the REPLACE_In2 string is ’DELTA’, REPLACE_L=2 and
REPLACE_LP=3. When REPLACE_EN is TRUE, Out1 is ’AaDELTACcDd’.
The variable table and program
REPLACE_P
UINT
Out1 STRING
In1=ABCDEFGH L=3 P=2
Out: AabcdEFGH
ABCDEFGH
Deletion starts from
the second character
Delete 3 characters
REPLACE
In2=abcd
AEFGH
Insert
In2
Delete Insert
1
REPLACE
EN ENO
In1 Out
L
In2
REPLACE_EN
REPLACE_In1
REPLACE_L
REPLACE_In2
Out1
PREPLACE_P
8-198