Preparing Fault Routines

15-9

 

 

Follow these guidelines when creating fault routines:

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 controller watchdog timer so your program can confirm that critical events took place.

IMPORTANT

When you clear a fault within the fault routine, it is possible for the controller to clear the fault, return to the faulty code, experience the same fault again and repeat the process over and over. When this happens, the controller is executing the faulty code and the fault routine code, but not the main ladder program. This causes the inputs and outputs to remain in their last state. To avoid this problem, place additional code in the fault routine to instruct the controller to execute the main portion of the ladder code once the fault is cleared.

Changing the Fault Routine from Ladder Logic

You can change the specified fault routine from ladder logic by copying a new fault routine file number into word 29 of the controller status file.

The following figure shows an example rung for changing the fault routine file number.

MOV

MOVE

 

Source

12

Dest

S:29

Do not corrupt the program-file number of the fault

ATTENTION

routine or use the same file for any other purpose. If

 

 

 

 

 

 

the file number you specify results in a non-existent

 

 

 

fault routine, the controller immediately enters fault

 

 

 

mode after detecting a fault. Unexpected machine

 

 

 

 

 

 

 

 

 

operation may result with damage to equipment

 

 

 

and/or injury to personnel.

Publication 1785-UM012D-EN-P - July 2005

Page 247
Image 247
Bradley Smoker PLC-5 user manual Changing the Fault Routine from Ladder Logic