DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-217
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
AFIND Search Example
In the following example, the AFIND instruction is used to search for the “day” portion
of “Friday” in the ASCII string “Today is Friday.”, which had previously been loaded into
V–memory. Note that a Search Starting Index of constant (K) 5 combined with a Forward
Direction Search is used to prevent finding the “day” portion of the word “Today”. The Found
Index will be placed into V4000.
Base Address
T
o
d
a
y
s
F
r
i
d
a
y
.
54h
6Fh
64h
61h
79h
20h
69h
73h
20h
46h
72h
69h
64h
61h
79h
2Eh
Low
Low
Low
Low
Low
Low
Low
Low
High
High
High
High
High
High
High
High
V3000
V3001
V3002
V3003
V3004
V3005
V3006
V3007
i
Reverse Direction Search
Forward Direction Search
0
3
2
6
5
4
1
7
8
9
10
11
12
13
14
15
Search start Index Number
Beginning Index Number
End Index Number
Found Index Number =
V4000
0012
ASCII Characters
HEX Equivalent