Logix5000 Controllers Major and Minor Faults Programming Manual
Logix5000 Controllers Major and Minor Faults Programming Manual
Programming Manual
IMPORTANT Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal injury or death,
ATTENTION
property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and
recognize the consequence
SHOCK HAZARD Labels may be on or inside the equipment, for example, a drive or motor, to alert people that
dangerous voltage may be present.
BURN HAZARD Labels may be on or inside the equipment, for example, a drive or motor, to alert people that
surfaces may reach dangerous temperatures.
Allen-Bradley, Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Summary of Changes
Introduction The release of this document contains new and updated information. To find
new and updated information, look for change bars, as shown next to this
paragraph.
Topic Page
Updated major fault codes Chapter 2
Notes:
Chapter 1
Monitor Minor Faults Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Minor Fault Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 2
Handle a Major Fault Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Choose Where to Place the Fault Routine . . . . . . . . . . . . . . . . . . . 15
Create a Fault Routine for a Program . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Create the Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Assign the Routine as the Fault Routine . . . . . . . . . . . . . . . . . . . . 16
Create a Routine for the Controller Fault Handler. . . . . . . . . . . . . . . . 17
Create a Routine for the Power-Up Handler . . . . . . . . . . . . . . . . . . . . 17
Programmatically Clear a Major Fault . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Create a Data Type to Store Fault Information . . . . . . . . . . . . . . . 18
Get the Fault Type and Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Check for a Specific Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Clear the Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Clear a Major Fault During Prescan . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Identify When the Controller is in Prescan . . . . . . . . . . . . . . . . . . 21
Get the Fault Type and Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Check for a Specific Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Clear the Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Test a Fault Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Create a User-Defined Major Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Create a Fault Routine for the Program . . . . . . . . . . . . . . . . . . . . . 25
Configure the Program to Use the Fault Routine . . . . . . . . . . . . . 25
Jump to the Fault Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Major Fault Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Purpose of this Manual This manual shows how to monitor and handle major and minor controller
faults. This manual is one of a set of related manuals that show common
procedures for programming and operating Logix5000 controllers. For a
complete list of common procedures manuals, see the Logix 5000 Controllers
Common Procedures Programming Manual, publication 1756-PM001.
The term Logix5000 controller refers to any controller that is based on the
Logix5000 operating system, such as:
· CompactLogix controllers
· ControlLogix controllers
· DriveLogix controllers
· FlexLogix controllers
· SoftLogix5800 controllers
How to Use this Manual Some text is formatted differently from the rest of the text.
Notes:
Introduction To use relay ladder logic to capture information about a minor fault:
Minor_fault_check times for 1 minute (60000 ms) and then automatically restarts itself.
Every minute, minor_fault_check.DN turns on for one scan. When this occurs, the GSV instruction gets the value of the
FAULTLOG object, MinorFaultBits attribute, and stores it in the minor_fault_bits tag. Because the GSV instruction only
executes once every minute, the scan time of most scans is reduced.
42373
This example checks for a minor fault that is caused by a specific instruction.
Multiply value_a by 1000000 and check for a minor fault, such as a math overflow.
· To make sure that a previous instruction did not produce the fault, the rung first clears S:MINOR.
· The rung then executes the multiply instruction.
· If the instruction produces a minor fault, the controller sets S:MINOR.
· If S:MINOR is set, the GSV instruction gets information about the fault and resets S:MINOR.
42373
Minor Fault Codes The type and code correspond to the type and code displayed in these
locations.
· Controller Properties dialog box, Minor Faults tab
· PROGRAM object, MINORFAULTRECORD attribute
A problem was detected with the DF1 master’s poll list, · total number of stations is greater than the space in
such as specifying more stations than the size of the the poll list tag
file, specifying more then 255 stations, trying to index · total number of stations is greater than 255
past the end of the list, or polling the broadcast address
(STN #255). · current station pointer is greater than the end of the
poll list tag
· a station number greater than 254 was encountered
9 5 DF1 slave poll timeout. Determine and correct delay for polling.
The poll watchdog has timed out for slave. The master
has not polled this controller in the specified amount of
time.
9 9 Modem contact was lost. Correct modem connection to the controller.
Notes:
Introduction If a fault condition occurs that is severe enough for the controller to shut
down, the controller generates a major fault and stops the execution of logic.
· Depending on your application, you may not want all major faults to
shut down your entire system.
· In those situations, you can use a fault routine to clear a specific fault
and let at least some of your system continue to operate.
A fault routine lets you program logic to take specific action after a fault, such
as clear the fault and resume execution. Where you place the routine depends
on the type of fault that you want to handle:
If you want take specific action/clear the fault when Do this Page
Condition Fault Type
The execution of an instruction faults 4 Create a Fault Routine for a Program 16
Communication with an I/O module fails 3 Create a Routine for the Controller Fault Handler 17
Watchdog time for a task expires 6
While a project is downloading to the 8
controller, the keyswitch is placed in RUN
A motion axis faults 11
The controller powers up in run/remote run 1 Create a Routine for the Power-Up Handler 17
mode
Create a Routine for the The power-up handler is an optional task that executes when the controller
powers up in run/remote run mode. Use the power-up handler when you want
Power-Up Handler to accomplish either of the following after power is lost and then restored:
To Do this
Prevent the controller from returning to Leave the routine for the Power-Up Handler empty. When power is restored, a major fault
run/remote mode (type 1, code 1) occurs and the controller enters the Faulted mode.
When power is restored, take specific In the routine for the Power-Up Handler:
actions and then resume normal
operation 1. Clear the major fault (type 1, code 1).
Programmatically Clear a To clear a major fault that occurs during the execution of your project,
Major Fault complete these actions in the appropriate routine.
· Create a Data Type to Store Fault Information
· Get the Fault Type and Code
· Check for a Specific Fault
· Clear the Fault
42372
1. 2.
1 Equal Equal
Source A major_fault_record.Type Source A major_fault_record.Code
0 0
Source B fault_type Source B fault_code
MOV MOV
Move Move
Source 0 Source
Dest major_fault_record.Type Dest major_fault_record
0
SSV
2 Set system value
CIP Object class PR
CIP Object name
Attribute name 42372
MAJORFAULTR
j f l d i
3. 4.
1. 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.
3. The first CLR instruction sets to zero the value of the fault type in the
major_fault_record tag.
4. The second CLR instruction sets to zero the value of the fault code in
the major_fault_record tag.
42372
Clear a Major Fault During If the controller faults immediately after you switch it to the Run mode, then
examine the prescan operation for the fault. Depending on the revision of
Prescan your controller, an array subscript that is beyond the range of the array (out of
range) during prescan may or may not produce a fault.
In the main routine of your program, enter this rung as the first rung in the
main routine of the program.
43063
The fault routine of this program uses the status of this bit to determine if the
fault occurred during prescan or normal scan of the logic.
· During prescan, this bit is off. (During prescan, the controller resets
all bits that are referenced by OTE instructions.)
· Once the controller begins to execute the logic, the CPU_scanning
bit is always on.
43064
1. 2. 3.
43064
4. 5.
1. During prescan the bits of all OTE instructions are off and this
instruction is true. Once the controller begins to execute the logic, this
instruction is always false.
2. The first EQU instruction checks for a fault of type 4, which means that
an instruction in this program caused the fault.
3. The second EQU instruction checks for a fault of code 20, which means
that either an array subscript is too large, or a POS or LEN value of a
CONTROL structure is invalid.
4. The first CLR instruction sets to zero the value of the fault type in the
major_fault_record tag.
5. The second CLR instruction sets to zero the value of the fault code in
the major_fault_record tag.
43064
1. During prescan the bits of all OTE instructions are off and this
instruction is true. Once the controller begins to execute the logic, this
instruction is always false.
Test a Fault Routine 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 will use to initiate the fault.
where: is the:
aaa tag that you will use to initiate the fault
bbb fault routine of the program
When test_fault_routine is on, a major fault occurs and the controller executes
Fault_Routine.
Create a User-Defined 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:
Major Fault · The fault type = 4.
· You define a value for the fault code. Choose a value between 990 to
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 faulted mode (major fault) and stops
executing the logic.
– Outputs are set to their configured state or value for faulted mode.
If Then
Yes Go to “Jump to the Fault Routine“on page 26
No Create a fault routine for the program:
4. Click OK.
4. Click OK.
Where Is
Fault_Routine name of the fault routine for the program
999 value for the fault code
When Tag_1.0 = 1, execution jumps to name_of_fault_routine. A major fault occurs and the controller enters the faulted
mode. Outputs go to the faulted state. The Controller Properties dialog box, Major Faults tab, displays the code 999.
Major Fault Codes The type and code correspond to the type and code displayed in these
locations.
· Controller Properties dialog box, Major Faults tab
· PROGRAM object, MAJORFAULTRECORD attribute
View the controller properties Major Fault tab and the module
properties Connection tab for more information about the fault.
3 20 Possible problem with the ControlBus chassis. Not recoverable - replace the chassis.
3 23 At least one required connection was not Wait for the controller I/O light to turn green before changing to
established before going to Run mode. Run mode.
4 16 Unknown instruction encountered. Remove the unknown instruction. This probably happened due to a
program conversion process.
4 20 Array subscript too big, control structure .POS Adjust the value to be within the valid range. Don’t exceed the
or .LEN is invalid. array size or go beyond dimensions defined.
4 21 Control structure .LEN or .POS < 0. Adjust the value so it is > 0.
4 31 The Parameters of the JSR instruction do not Pass the appropriate number of Parameters. If too many
match those of the associated SBR or RET Parameters are passed, the extra ones are ignored without any
instruction. error.
4 34 A timer instruction has a negative preset or Fix the program to not load a negative value into timer preset or
accumulated value. accumulated value.
4 42 JMP to a label that did not exist or was Correct the JMP target or add the missing label.
deleted.
Notes:
For an additional level of technical phone support for installation, configuration, and
troubleshooting, we offer TechConnect support programs. For more information,
contact your local distributor or Rockwell Automation representative, or visit
http://support.rockwellautomation.com.
Installation Assistance
If you experience a problem within the first 24 hours of installation, please review the
information that's contained in this manual. You can also contact a special Customer
Support number for initial help in getting your product up and running.
Rockwell Automation tests all of its products to ensure that they are fully operational
when shipped from the manufacturing facility. However, if your product is not
functioning and needs to be returned, follow these procedures.
United States Contact your distributor. You must provide a Customer Support case
number (call the phone number above to obtain one) to your distributor
in order to complete the return process.
Outside United Please contact your local Rockwell Automation representative for the
States return procedure.