Processor Status File

B-5

 

 

S:12

This word stores the following fault codes:

 

This

 

 

Fault

 

 

Code

Indicates this Fault

And the Fault Is

 

 

 

00-09

Reserved for user-defined fault codes.

Recoverable:

 

You can use user-defined fault codes to identify different types of faults or error conditions in

The fault routine can instruct the

 

your program by generating your own recoverable fault. To use these fault codes, choose an

controller to clear the fault and

 

input condition that decides whether to jump to a fault routine file, then use the JSR

then resume scanning the

 

instruction as the means to jump to the fault routine file.

program.

 

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).

A fault routine executes when

 

 

 

You do not have to use the user-defined fault codes to generate your own fault. If you

any of these faults occur.

 

program a JSR with no input parameters, the controller 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 controller 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 controller sets a Major Fault S:11/7 “User-Generated

 

 

Fault.” The controller then faults unless you clear the Major Fault word (S:11) or the specific

 

 

fault bit via ladder logic in the fault routine.

 

 

 

 

10

Run-time data table check failed

Recoverable:

 

 

 

11Bad user program checksum

12Bad integer operand type, restore new controller memory file

 

 

The fault routine can instruct the

13

Bad mixed mode operation type, restore new controller memory file

controller to clear the fault and

 

 

then resume scanning the

14

Not enough operands for instruction, restore new controller memory file

program.

 

 

15Too many operands for instructions, restore new controller memory file

16Corrupted instruction, probably due to restoring an incompatible controller memory file (bad opcode)

17Can’t find expression end; restore new controller memory file

18Missing end of edit zone; restore new controller memory file

19Download aborted

20You entered too large an element number in an indirect address

21You entered a negative element number in an indirect address

22You tried to access a non-existent program file

23You used a negative file number, you used a file number greater than the number of existing files, or you tried to indirectly address files 0, 1, or 2

A fault routine executes when any of these faults occur.

24

You tried to indirectly address a file of the wrong type

Recoverable

Publication 1785-UM012D-EN-P - July 2005

Page 279
Image 279
Bradley Smoker PLC-5 S12, This word stores the following fault codes, This Fault Code Indicates this Fault Fault Is