![Allen-Bradley PLC-2/30 Programming And Operations Manual Download Page 294](http://html1.mh-extra.com/html/allen-bradley/plc-2-30/plc-2-30_programming-and-operations-manual_2900216294.webp)
Chapter
17
171
File Search and File Diagnostic
Instructions
The File Search instruction locates all words in a file whose data is
identical to a specific input word’s data.
The File Diagnostic instruction can be used to locate discrepancies
between actual and desired states of I/O’s by searching for 1 in the result
file of an XOR operation (Section 16.1.3).
NOTE: This section assumes the reader has read Chapter 12, Data
Transfer File Instructions, and is familiar with the concepts introduced in
that chapter.
This output instruction consists of an input word, a data file to be searched,
and a counter (Figure 17.1). Upon false-true transition of rung decision, the
input word data is compared to the file data. When a match is found, the
position counter accumulated value indicates that word of the file. Upon
the next false-to-true transition, the instruction continues searching the rest
of the file. If another equality is found, the counter accumulated value
indicates current match word.
Figure 17.1
FILE SEARCH Operation
5612
500
003
064
Position
File Length
Input Word
The input word data has been found equal to data in word 402, the third in the
file. The counter accumulated value, 3, indicates this.
Counter
400
401
402
477
5612
File (64 words)
17.0
General
17.1
File Search
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com