330
M D R
I
P
S1
S2
D
1
2
M
3
○
FNC
206
X Y M S
D.b R.b
KnX KnY
KnM KnS
T C
D,R
V,Z
UnG
K,H
E
" $"
S1
D
S2
S1 : the head ID of the source character string
D : the head ID of the storage block for the read string
S2 : to appoint the patterns of the string reading
MIDR D0 D10 D20
X0
To read +1 characters by the designated starting position at the source string , and store the extracted
result into .
D
D
S
D0
D1
D2
D3
00H
20H( )
45H( E)
49H
I
( )
49H
I
( )
4CH( L)
4BH K( )
20H( )
4FH
O
( )
49H
I
( )47H(G)
52H R( )
56H(V)
D4
D5
D6
" I LIKE VIGOR"
X0=ON
D10
D11
D12
0000H
45H( E)
49H
I
( )
4CH( L)
4BH K( )
" LIKE"
S1
S2
S2 S 2
D20
D21
S1
D
S2
3
4
If the D21 = 0, this instruction will not execute.
If the D21 = –1, this instruction will extract a part of source string which is starting from the third position to the last
character. That is shown in the example below.
X0=ON
D20
D21
" I LIKE VIGOR"
D0
D1
D2
D3
00H
20H( )
45H( E)
49H
I
( )
49H
I
( )
4CH( L)
4BH K( )
20H( )
4FH
O
( )
49H
I
( )47H(G)
52H R( )
56H(V)
D4
D5
D6
S1
S2
3
–1
D10
D11
D12
D13
45H( E)
49H
I
( )
4CH( L)
4BH K( )
20H( )
4FH
O
( )
49H
I
( )47H(G)
52H R( )
56H(V)
D14
D15
D
0000H
" LIKE VIGOR"
If the operation has one of the following situation, the PLC will regard that as an operational error.
1. The string from which does not have the end of string code “00H”.
2. The is negative.
3. The value of +1 is exceeding the string from could provide with, or the +1 is less than –1.
S1
S2
S2S1S2
Operand
Devices
Extract Character from Specic Place
of String
Upper
8 bits
Lower
8 bits
Upper
8 bits
Lower
8 bits
When X0 = “ON”, the instruction will be executed as follows:
Upper
8 bits
Lower
8 bits
Upper
8 bits
Lower
8 bits