5.8 Standard Character String Functions
181
FXCPU Structured Programming Manual
(Application Functions)
1
O
utlin
e
2
Function Li
st
3
Functi
on
Cons
tructi
on
4
Ho
w t
o R
ea
d
Explanati
on of
Func
tions
5
Appl
ie
d
Functions
6
Stan
dard
Functi
on
Blocks
A
Correspondence
be
tw
een Dev
ice
s
an
d A
ddres
ses
5.8
Standard Character String Functions
5.8.1
MID(_E)
Outline
This function obtains a character string from a specified position.
1. Format
*1.
Output variable
2. Set data
In explanation of functions, I/O variables inside ( ) are described.
FX
3U(C)
FX
3G
FX
2N(C)
FX
1N(C)
FX
1S
FX
U
/FX
2C
FX
0N
FX
0(S)
Function name
Expression in each language
Structured ladder
ST
MID
MID(_IN,_L ,_P);
Example:
Label 2:=
MID(Label 1,D10,D20);
MID_E
MID_E(EN,_IN,_L ,_P,Output label);
Example:
MID_E(X000,Label 1,D10,D20,
Label 2);
Variable
Description
Data type
Input
variable
EN
Execution condition
Bit
_IN (
)
Head word device which stores a character string
String
_L
(
)
Word device which stores the number of characters to be obtained
Word [signed]
_P (
)
Word device which stores the head character position of a character
string to be obtained
Word [signed]
Output
variable
ENO
Execution status
Bit
*1
(
)
Head word device which will store the obtained character string
String
MID
Label 2
Label 1
_IN
D10
_L
D20
_P
*1
MID_E
EN
ENO
*1
Label 2
X000
Label 1
_IN
D10
_L
D20
_P
s
n1
n2
d