Test a fault routine, Create a user-defined major fault – Rockwell Automation Logix5000 Controllers Major, Minor, and I/O Faults Programming Manual User Manual
Page 27
![background image](/manuals/579580/27/background.png)
Major faults Chapter 1
The SSV instruction:
•
Begins during prescan with the bits of all OTE instructions off and this
instruction is true. When the controller begins to run the logic, this
instruction is always false.
•
Writes the new values to the MajorFaultRecord attribute of this program.
•
Writes the values contained in the major_fault_record tag. Because the
Type and Code member are set to zero, the fault clears and the logic starts
running again.
You can use a JSR instruction to test the fault routine of a program without
creating an error (simulate a fault).
1. Create a BOOL tag that you use to initiate the fault.
2. In the main routine or a subroutine of the program, enter the following
rung, where:
•
test_fault_routine is the tag that you use to initiate the fault.
•
Fault_Routine is the fault routine of the program.
When test_fault_routine is on, a major fault occurs and the controller
executes Fault_Routine.
If you want to suspend (shut down) the controller based on conditions in your
application, create a user-defined major fault. With a user-defined major fault:
•
The fault type = 4.
•
You define a value for the fault code. Choose a value between 990 and 999.
These codes are reserved for user-defined faults.
•
The controller handles the fault the same as other major faults:
•
The controller changes to the Program mode and stops running the
logic.
•
Outputs are set to their configured state or value for faulted mode.
Example:
When Tag_1.0 = 1, produce a major fault and generate a fault code of 999.
Test a fault routine
Create a user-defined major
fault
Rockwell Automation Publication 1756-PM014G-EN-P – October 2014
27