Technical data

Diagnostics
23.9 Program Measures for Handling Errors
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 501
23.9 Program Measures for Handling Errors
When it detects errors in program processing (synchronous errors) and errors in the programmable
controller (asynchronous errors), the CPU calls the appropriate organization block (OB) for the
error:
Error Error OB
I/O redundancy error OB70
CPU redundancy error OB72
Time error OB80
Power supply error OB81
Diagnostic interrupt OB82
Insert/remove module interrupt OB83
CPU hardware fault OB84
Priority class error OB85
Rack failure or failure of a station in the distributed I/O OB86
Communication error OB87
Programming error OB121
I/O access error OB122
If the appropriate OB is not available, the CPU goes into STOP mode (exceptions: OB70, OB72,
OB81, OB87). Otherwise, it is possible to store instructions in the OB as to how it should react to
this error situation. This means the effects of an error can be reduced or eradicated.
Basic Procedure
Creating and Opening the OB
1. Display the module information for your CPU.
2. Select the "Performance Data" tab.
3. Decide on the basis of the list displayed whether the OB you want to program is permitted for
this CPU.
4. Insert the OB in the "Blocks" folder of your program and open the OB.
5. Enter the program for handling the error.
6. Download the OB to the programmable controller.
Programming Measures for Handling Errors
7. Evaluate the local data of the OB to determine the exact cause of the error.
The variables OB8xFLTID and OB12xSWFLT in the local data contain the error code. Their
meaning is described in the "System and Standard Functions Reference Manual."
8. Branch to the program segment which reacts to this error.
You will find an example of handling diagnostic interrupts in the reference online help on System
and Standard Functions under the heading "Example of Module Diagnostics with SFC51
(RDSYSST)."