Mitsubishi Electric FX3G SERIES Programming Manual page 641

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
4)
A character string can be directly specified in the character string
Character string to be searched
b15
+0
32H(2)
S
2
+1
34H(4)
42H(B)
+2
+3
36H(6)
+4
42H(B)
+5
"1234AB56AB"
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When the search start position "n" exceeds the number of characters stored in
• When "00H (NULL)" is not located within the corresponding device range starting from
• When "00H (NULL)" is not located within the corresponding device range starting from
Program example
1)
In the program example below, the character string "CI23" (D0 and later) is searched from the 5th character from
the left end (head character) of the character string "CI2312CIM" (R0 and later) when X000 is set to ON. The
search result is stored in D100
X000
FNC208
INSTR
Character string to be searched R0
b15
R0
49H(I)
R1
33H(3)
R2
32H(2)
R3
49H(I)
R4
00H
"CI2312CIM"
S
2
b8 b7
b0
31H(1)
Search is started from
33H(3)
the 3rd character (n = 3).
41H(A)
Fifth character from
the head character
35H(5)
41H(A)
00H
D0
R0
D100
b8 b7
b0
These characters are not
43H(C)
searched because the
32H(2)
search start position is "5".
31H(1)
The search source
character string is searched
43H(C)
from the 5th character.
4DH(M)
26 Character String Control – FNC200 to FNC209
26.9 FNC208 – INSTR / Character string search
S
.
1
Character string
"AB"
D100
5
S
2
K5
END
Character string D0
b15
b8 b7
D0
49H(I)
43H(C)
D1
33H(3)
D2
"CI23"
D100
0
Because the searched
character string is not
detected, "0" is stored.
S
1
(error code: K6706)
S
(error code: K6706)
1
S
(error code: K6706)
2
b0
32H(2)
00H
639
21
22
23
24
25
26
27
28
29
30

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents