File Search And File Diagnostic Instructions; File Search Operation - Allen-Bradley PLC-2/30 Programming And Operations Manual

Hide thumbs Also See for PLC-2/30:
Table of Contents
17.0
General
17.1
File Search
500
Counter
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.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
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

Input Word
5612
003
Position
064
File Length
17
Chapter
400
401
5612
402
File (64 words)
477
17 1
Table of Contents
loading

Table of Contents