Chapter 8 Logic Instructions
8.14.5 MID
FB/FC
Explanation
FC
MID extracts a specified-length string from the specified character position of a
string variable or constant.
DVP15MC11T
Parameters
Meaning
Description Valid range
In Original string Input Original string
Depends on the data type of the
variable that the input parameter is
L
characters to
Input
Number of
characters to extract
0~ maximum number of characters
P
Extraction start
position
Input
Extraction start
position
1~ maximum number of characters
Out Extraction result Output Extraction result
Depends on the data type of the
variable that the output parameter is
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In
●
L
●
P
●
Out
●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8-195