7.11 String Processing Instructions
7.11.17 Character string data search
7-221
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
INS
T
R
INSTR
Function
(1) Searches for the character string data specified for
in the devices from the nth character
from the left of the character string data specified for
and stores the result to the device
specified for
.
As the result of search, the location of match, counted in the number of characters from the
first character of the character string data specified for
, is stored.
When n 3
(2) If there is no matching character string data, stores 0 to
.
(3) No processing will be performed if n is a negative value or 0.
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The value of n exceeds the number of characters in
.
(Error code: 4100)
• 00
H
(NULL) does not exist within the corresponding device range following the devices
specified for
and
.
(Error code: 4100)
s
1
s
2
d
s
2
S
earches
from
the
3
r
d
character
+1
41
H
(A)
42
H
(
B
)
43
H
(C)
44
H
(
D
)
45
H
(E)
46
H
(F)
47
H
(G)
48
H
(H)
49
H
(I)
4A
H
(J)
4
B
H
(K)
00
H
+2
+3
+4
+5
"A
B
C
D
EFGHIJK"
+1
45
H
(E)
46
H
(F)
47
H
(G)
48
H
(H)
+2
00
H
"EFGH"
5
th
character
from
the
f
i
rst
character
5
S
tores
the
pos
i
t
i
on
of
the
foun
d
character
,
counte
d
by
the
num
b
er
of
characters
from
the
1
st
character
i
n
the
character
str
i
ng
d
ata
spec
i
f
i
e
d
for
.
b15
b8b7
b0
s
1
s
2
d
b15
b8b7
b0
s
2
s
2
s
2
s
2
s
2
s
1
s
1
s
2
d
s
2
s
1
s
2
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......