Rockwell Automation 1785-LTx,D17856.2.1 Classic PLC-5 Programmable Controllers Users Manual User Manual

Page 88

Advertising
background image

Selecting Interrupt Routines

Chapter 7

7-6

Important: If the PLC-5 processor detects a fault in the fault routine
(double fault condition), the PLC-5 processor goes directly to fault mode
without completing the fault routine.

Programming a Fault Routine

If you choose to program a fault routine, first have the fault routine
examine the major fault information recorded by the PLC-5 processor and
decide whether to do the following before the PLC-5 processor
automatically goes to fault mode:

set an alarm
clear the fault
shutdown in an orderly manner

On detecting a major fault, the PLC-5 processor immediately suspends the
program file it was running and, if programmed, runs the fault routine file
once to completion. If the PLC-5 processor does not run a fault routine, or
the fault routine does not clear the fault, the PLC-5 processor automatically
switches to fault mode.

Set an Alarm
You may need an alarm to signal when a major fault occurs. Put this rung
first in your fault routine program

output

alarm

and combine it with a counter. You can also set an alarm in your fault
routine to signal when the fault routine clears a major fault.

Clearing the Fault
If you decide to clear the fault in the fault routine, place the ladder logic
for clearing the fault at the beginning of the fault routine. You can
compare the fault code with a reference.

Compare fault code with a reference—Identify the possible major faults
and then select only those your application will let you safely clear. These
are your reference fault codes.

From the fault routine, examine the major fault code that the processor
stores in S:12. Use an FSC instruction to compare the fault code to the
reference file that contains “acceptable” fault codes (word-to-file
comparison). If the processor finds a match, the FSC instruction sets the
found (.FD) bit in the specified control structure. Use a MOV instruction
to clear the fault in S:11. Then jump to the end of the fault routine to
quickly complete running the fault routine.

Advertising