Chapter 1 Major Faults
22 Rockwell Automation Publication 1756-PM014N-EN-P - March 2022
caused the program fault, and the controller does not enter fault mode. If a
fault routine does not clear the fault, the controller invokes the Controller
Fault Handler program.
Use this example to write a fault routine to clear a major fault.
code
• Accesses the MajorFaultRecord attribute of this program. This attribute stores information about the fault.
• Stores the fault information in the major_fault_record (of type FAULTRECORD) tag. When the tag is based on a structure, enter
the first member of the tag.
fault.
The first EQU instruction checks for a specific type of fault, such as program, I/O. In Source B, enter the value for the type of
fault that you want to clear.
The second EQU instruction checks for a specific fault code. In Source B, enter the value for the code that you want to clear.
fault type to zero
The first CLR instruction sets the value of the fault type in the major_fault_record tag to zero.
Add the second CLR instruction sets the value of the fault code in major_fault_record tag to zero.
The SSV instruction writes:
• The new values to the MajorFaultRecord attribute of this program.
• The values contained in the major_fault_record tag. Because the Type and Code member are set to zero, the fault clears and
the controller resumes execution.
See also
Create a data type to store fault information on page 20
If the controller faults immediately after it switches to Run mode, examine
the prescan operation for the fault. Depending on the revision of the
controller, an array subscript that is beyond the range of the array (out of
range) during prescan might cause a fault.
If controller is revision
During prescan, an array subscript that is beyond the range of the array (out of
range) produces a major fault.
See the release notes for the firmware of your controller.
Clear a major fault during
prescan