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

Page 90

Advertising
background image

Selecting Interrupt Routines

Chapter 7

7-8

Using Shutdown Logic
Shutdown programming should include the following considerations.

Store initial conditions and reset other data to achieve an orderly

start-up later.

Monitor the shutdown of critical outputs. Use looping if needed to

extend the single fault routine scan time up to the limit of the
processor watchdog timer so that your program can confirm that critical
events took place.

Testing a Fault Routine

To test a fault routine, use a JSR instruction to jump to the fault routine.
Send a fault code as the first input parameter of the JSR instruction. The
processor stores the fault code in status word 12 and sets the corresponding
bit in word 11.

You may detect and set your own faults using fault codes 0-9 or by using
the processor-defined fault codes 10-87.

Setting Up a Fault Routine

You can write multiple fault routine programs and store them in multiple
fault routine files, but the logic processor runs only one fault routine
program when the PLC-5 processor detects a major fault. The number of
the fault routine the PLC-5 processor runs is stored in word 29 of the
processor status file. Typically, you enter a fault routine file number with
the programming software and change the specified fault routine file from
the ladder program.

To set up a fault routine, you need to:

enable the fault routine by entering a fault routine file number in the

status file

create the program file and enter fault routine logic

clear a major fault (other than by the fault routine)

Enabling a Fault Routine

To enable a fault routine, store the program file number (3-999) of the file
that contains the fault routine logic in word 29 of the processor status file.
When the processor encounters a major fault, the processor runs the fault
routine logic to handle the fault.

Advertising