DVP15MC11T Operation Manual
Function Explanation
The MID instruction extracts L characters starting from the number-P character of the In string. The
extracted string is output to Out. The extraction 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
The MID_In string is ’AaBbCcDd’, MID_L=2 and MID_LP=3. When MID_EN is TRUE, Out1 is ’Bb’.
The variable table and program
MID_P
UINT
Out1 STRING
In =ABCDEFGH L= 3 P=2
Out :
BCD
ABCDEFGH
Extrac tion starts from
the second character
Extract three characters
MID
1
MID
EN ENO
In Out
P
L
MID_EN
MID_In1
MID_P
MID_L
Out1
8-196