Create a routine for the controller fault handler
Use these steps to create a fault routine to operate as the controller fault handler. Program tags are automatically created during this process.
IMPORTANT:
When programming the fault handler, remember that any instruction that is skipped as part of the fault-handling program does not run when the main tasks and associated programs run.
For example, if the fault handler skips a JSR instruction that is causing a major fault, then that JSR instruction, including all of the programming within the subroutine, does not run.
When an instruction generates an error due to a fault (for example, a COP with an indirect addressing programming error), the instruction is skipped and does not run. This occurs with all instructions.
To create a routine for the controller fault handler
- In the Controller Organizer, right-clickController Fault Handlerand selectNew Program.
- On theNew Programdialog box, inName, type a program name. Verify thatSchedule inis set toController Fault Handler.
- SelectOK.
- In the Controller Organizer, right-click the program created in step 2 and selectAdd>New Routine.
- On theNew Routinedialog box, inName, type a name for the routine.
- InType, choose the type of routine to create. The default is Ladder Diagram.
- InAssignment, use the default setting,Main.TIP:Even thoughFaultis an option in theAssignment, assigning the routine as a fault routine within the Controller Fault Handler is not necessary.
- SelectOK.The fault routine is created in theController Fault Handlerprogram.
- Double-click the fault routine to edit it.
Provide Feedback