S:12 – Rockwell Automation 1785-Lx0C15 ControlNet PLC-5 Programmable Controllers User Manual User Manual
Page 104

1785-UM022C-EN-P - February 2008
B-4
Processor Status File
S:12
This word stores the following fault codes:
S:11/12
PII file does not exist or is not a ladder file
S:11/13
STI file does not exist or is not a ladder file
S:11/14
Fault routine does not exist or is not a ladder file
S:11/15
Faulted program file does not contain ladder logic
This word of
the status file:
Stores:
This
fault
code:
Indicates this fault:
And the fault is:
00-09
Reserved for user-defined fault codes.
You can use user-defined fault codes to identify different types of faults or error conditions in your
program by generating your own recoverable fault. To use these fault codes, choose an input condition
that decides whether to jump to a fault routine file, then use the JSR instruction as the means to jump to
the fault routine file.
To use the JSR instruction, enter the fault code number 0-9 (an immediate value) as the first input
parameter of the instruction. Any other input parameters are ignored (even if you have an SBR instruction
at the beginning of your fault routine file. You cannot pass parameters to the fault routine file using
JSR/SBR instructions).
You do not have to use the user-defined fault codes to generate your own fault. If you program a JSR with
no input parameters, the processor will write a zero to the Fault Code field. The purpose of using the
user-defined fault codes is to allow you to distinguish among different types of faults or error codes
based on the 0-9 fault code numbers.
When the input condition is true, the processor copies the fault code number entered as the first input
parameter of the JSR instruction into word 12 of the processor status file (S:12), which is the Fault Code
field. The processor sets a Major Fault S:11/7 “User-Generated Fault.” The processor then faults unless
you clear the Major Fault word (S:11) or the specific fault bit via ladder logic in the fault routine.
Recoverable:
the fault routine can instruct
the processor to clear the
fault and then resume
scanning the program.
A fault routine executes
when any of these faults
occur.