Major Fault State

If a fault condition occurs that prevents an instruction from running, the instruction aborts and the controller reports a major fault. A major fault halts logic execution and the controller switches to faulted mode (the OK LED flashes red).
Depending on the application, you may not want all major faults to shut down the system. If you do not want all major faults to shut down the system, create a fault routine to clear the fault and let the application continue to run.
Fault Recovery
The process of resuming execution after a fault is cleared is known as fault recovery.
IMPORTANT: Do not use fault routines to continually clear all faults on the controller. Program the fault routine to be selective in the types and number of faults cleared. It is also a good idea to log the fault occurrence to analyze it later.
IMPORTANT: When an instruction generates an error due to a fault (for example, a COP with an indirect addressing programming error), the fault routine skips the instruction and does not run. This occurs with all instructions.
Example:
In a system that uses recipe numbers as indirect addresses, an incorrectly typed number could produce a major fault.
To keep the entire system from shutting down in the event of this fault, program a fault routine to clear type 4, code 20, major faults.
Recovering From a Major Fault
If the fault is cleared, the faulted instruction does not continue executing.
Example
A JSR instruction passes an input parameter containing an indirect address that is out of bounds. If the fault is cleared, the JSR instruction is cancelled (the subroutine is not executed) and execution resumes with the EQU.
Fault Handling During Prescan and Postscan
The behavior of each instruction varies depending on the mode in which it runs–true, false, prescan, or postscan. For details about what a specific instruction does in each mode, see the Logix 5000 Controllers General Instructions Reference Manual, publication number 1756-RM003.
  • Prescan provides a system-defined initialization of the user program when the controller switches from program mode to run mode.
  • Postscan provides a system-defined re-initialization of the logic invoked from an SFC action, when the action shuts down (if SFCs are configured for Automatic Reset).
If an array index is out of range during prescan, the controller could generate a major fault. There are a number of ways this could happen: the controller loses power, encounters a major fault, or the project is saved while online.
Because the user program, during prescan and postscan, cannot assign values to tags, the only way to correct these issues is to manually initialize the index variables using the Logix Designer application or to write a fault handler to ignore the array faults during prescan.
To reduce the need for manual intervention, the Logix Designer application includes an internal fault handler. This handler is only used during prescan and only clears array faults (type 4, fault codes of 20 of 83).
TIP: Array faults are not ignored during postscan because the user program controls index tag values when an action is shut down.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal