Entry type: FAQ, Entry ID: 19350076, Entry date: 03/20/2009

Which organization blocks do you have to load into the CPU to ensure that the CPU does not go into the "STOP" status when a remote I/O fails?

  • Entry
  • Associated product(s)

Configuration Notes:
If the CPU recognizes an asynchronous or synchronous error during the cyclical run (e.g. diagnostics alarm of a DP slave or PROFINET I/O device, station failure, etc.), it calls an appropriate organization block (OB). Users thus have the option of responding to this event.

The following OBs have to be loaded in the CPU to ensure that they can be called by the CPU's operating system if an asynchronous or synchronous error occurs.

OB no. Explanation OB called
Call upon
incoming event
Call upon
outgoing event
82 Diagnostics alarm A diagnostics-compatible module, for which you have enabled the diagnostics alarm, detects an error and when the error is cleared
(e.g. a short circuit in the input module).
Asynchronous error Yes Yes
83 Remove/plug alarm1) A module in the central or expansion devices is removed and plugged in (e.g. an input module is removed). Asynchronous error Yes Yes
85 Program
cycle error
- A start event for an Alarm OB is present, but the OB cannot be executed because it has not been loaded into the CPU
- An error has occurred when accessing the instance DB of a system function block.
- An error has occurred when updating the process image (module missing or defective).
Asynchronous error Configuration-specific Configuration-specific
86 Module rack
Failure of a DP slave in a PROFIBUS DP master system or of an IO device in the PROFINET IO system. Asynchronous error Yes Yes
121 Programming
A programming error has occurred (e.g. called block is not loaded). Synchronous error Yes No
122 IO access
An attempt is made to access a non-existent signal module. Synchronous error Yes No
1) In the S7-300 CPU, there is no remove/plug alarm when removing/plugging in modules that are used on the PROFIBUS DP, like removing a DP slave module (exception: CPU 318-2). Depending on the DP slave used, the complete DP slave fails, which leads to OB86 "Subrack failure" being called, or standard diagnostics are performed, which leads to OB82 "Diagnostics alarm" being called.
In the S7-300 CPU, there is a remove/plug alarm only when removing/plugging in modules that are used on the PROFINET IO (e.g. removing an IO device).

If the above-mentioned organization blocks are not loaded in the CPU, the CPU switches to the "STOP" mode after attempting to call them.

If you use the error OBs, then error handling should be programmed for reliable and error-free plant operation or at least a message should be generated in case of an error. Please take into account that the CPU might no longer go into "STOP" and thus dangerous plant statuses might remain unnoticed.
Detailed information on programming the error OBs is available in the STEP 7 Online Help or in the manual "System Software for S7-300/400 System and Standard Functions" in Entry ID: 1214574.

Further information and notes:
The diagnostics buffer of the CPU contains more information and notes about which organization block the CPU has called.

More detailed information on individual error OBs is also available in the STEP 7 Online Help under the following keywords:

  • "Diagnostics > Measures in the program for error handling" 
  • "Calling reference data (LAD/FBD/STL, blocks ...) > Language description, block help, system attributes > Help on OBs"
  • "Error OBs"
  • "Settings for reporting system errors"

The following entry tells you which organization blocks do you need for error handling in the S7 program of the CPU: 11499205.