![background image](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831374.webp)
Chapter 6 Instruction Details
XBC E-Type Main Unit
6-257
Ver. 1
6.34.15 FIND, FINDP
Instruction
Area Available
Step
Flag
P M K
F
L
T
C
S
Z D.x R.x
Con
st
U
N
D
R
Error
(F110)
Zero
(F111)
Carry
(F112)
FIND(P)
S1 O O O
-
O
-
-
-
O
-
-
-
O O O O
4~7
O
-
-
S2 O O O
-
O
-
-
-
O
-
-
-
O O O O
D
O O O
-
O
-
-
-
O
-
-
-
O O O O
N
O O O O O O O
-
O
-
-
O O O O O
Operand
Description
Data Type
S1
Start address of string to be searched for
STRING
S2
Start address of string to search for
STRING
D
Address to save result
WORD
N
Start position to search for string
WORD
[Flag Setting]
Flag
Description
Device Number
Error
1.If S1, S2’s string length exceeds the maximum string size
2.If start position to search specified in N is larger than string’s length to be searched for,
specified in S1
F110
1) FIND
It searches starting Nth character of specified string S1 for the string with starting S2. Then saves the first
identical string’s start position in D.
2) Program Example
P00000
FIND P1000 P1100 P1200 P1300
FIND
means FIND
P S1
FINDP
S1
D
N
S2
D
N
S2
S1
S1+1
S1+2
S1+3
T (0x54)
S1+4
P (0x50)
C (0x33)
. . . .
N
b0
b15
b7
b8
C (0x43)
T (0x54)
NULL (0x00)
P (0x50)
S2
S2+1
6
D
Distance from the S1’s start position saved
.
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...