5.8 Standard Character String Functions
196
FXCPU Structured Programming Manual
(Application Functions)
Explanation of function and operation
1) This function searches a character string stored in devices specified in from the beginning of a
character string stored in devices specified in , and outputs the search result to devices specified in
.
This function outputs the head character position of the searched character string detected first as the
search result.
2) A character string (data) stored in devices specified in indicates the data until "00H" is detected first
in units of byte in the range starting from the specified device.
3) If a character string stored in devices specified in cannot be detected in a character string stored in
devices specified in , this function outputs "0".
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data in structured programs, you cannot specify 16-bit devices directly,
different from simple projects. Use labels when handling character string data.
Use global labels when specifying labels.
Error
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When "00H (NULL)" does not exist in the corresponding device range specified in
(Error code: K6706)
2) When "00H (NULL)" does not exist in the corresponding device range specified in
(Error code: K6706)
s2
s1
d
s
s2
s1
Output value
High-order byte Low-order byte
32H(2)
31H(1)
33H(3)
34H(4)
0000H
1st word
2nd word
3rd word
Input value to
"1234"
42H(B)
Input value to
"ABCD1234567"
41H(A)
43H(C)
33H(3)
44H(D)
00H
36H(6)
34H(4)
32H(2)
31H(1)
35H(5)
37H(7)
High-order byte Low-order byte
1st word
2nd word
3rd word
4th word
5th word
6th word
Search of
character string
Word [signed]
5
s1
s2
s1
s2