Rockwell Automation 1772-AF3,D17726.5.2 User Manual AUX FUNCT PROM User Manual

Page 26

Advertising
background image

File Diagnostic Instruction

Chapter 4

4Ć9

The following examples of program logic should help you to design your own
logic for using the file diagnostic instruction.

Search Each Scan - You can program the file diagnostic instruction to search
for a mismatch every scan by programming two instructions as follows
(Figure 4.9).

Figure 4.9

Example Logic for Search Every Scan

L

0520

010

00

011

00

OFF17

U

0520

010

00

011

00

OFF 17

Execute Aux

Function

Function Number:
Data Addr:
Result Addr:

20

0500
0520

Execute Aux

Function

Function Number:
Data Addr:
Result Addr:

20

0500
0520

If rung 1 logic conditions are true, the enable bit, 0520/17, will latch on. Rung
2 will execute the file diagnostic instruction. Rung 3 will unlatch the enable bit
because its logic conditions are identical to those of rung 1. The file diagnostic
instruction in rung 4 will see the enable bit reset and will likewise reset the last
state bit. Then execution can continue in the next scan. Both file diagnostic
instructions must be identical.

Example Program to Demonstrate the File Diagnostic Instruction

You can observe the operation of the file diagnostic instruction using the
following example. The program finds errors in all bits of words 0130 and
0132 for a total of 32 errors. You can observe the progression of the error count
(1-32) and the progression of the bit pointer (00-17) as the program repeatedly
counts in 0.1 second intervals from 000 thru 015.

Enter the program in Figure 4.10 into processor memory. Clear the memory
before entering the program by entering [CLEAR MEMORY] 99. Enlarge the

Example Programs

Advertising