Description
The S7-1200 PLC can detect and report peripheral device errors for diagnostics-capable devices. These errors are called diagnostic errors. The following diagnostic errors are supported:
- No user power (on the signal module / board)
- High limit exceeded (of the value on an analog input or output)
- Low limit exceeded (of the value on an analog input or output)
- Wire break (on an analog Current output)
- Short circuit (on an analog Voltage output)
All diagnostic error events trigger the execution of the "Diagnostic error interrupt" organization block (OB82).
The "Diagnostic error interrupt" OB82 includes startup information that helps you determine the circumstances of the error occurrence:
- Which device and channel reported the error.
- Whether the event is due to the occurrence or removal of an error.
You can program instructions inside OB82 to examine these startup values and to take appropriate action.
Evaluating the diagnostic error events with the "Diagnostic error interrupt" organization block (OB82)
The occurrence or removal of any of several different diagnostic error conditions results in a diagnostic error event if the following preconditions are met:
- The OB82 has been added to the program of your S7-1200 PLC.
- The diagnostic error event has been enabled for the module.
If OB82 does not exist, then the CPU ignores the error.
The "Diagnostic error interrupt" OB82 interrupts the normal cyclic program execution if a diagnostics-capable module recognizes an error.
Note
No "Diagnostic error interrupt" OB82 is present when you create a new project.
| No. | Evaluating the diagnostic error events with the "Diagnostic error interrupt" organization block OB82 |
| 1 | Add the "Diagnostic error interrupt" OB82
Note
|
| 2 | Reading out the start information of the "Diagnostic error interrupt" OB82
![]() Fig. 02 |
| 3 | Evaluating the start information of the "Diagnostic error interrupt" OB82 The "Diagnostic error interrupt" OB82 has the following start information: "IOstate" (WORD) "laddr" (HW-ANY) "Channel" (UINT) "multierror" (BOOL)
|
Enabling and understanding the different diagnostic error events
The operating system monitors the diagnostics-capable devices for the diagnostic errors mentioned above. Diagnostic error events will be indicated by red blinking LEDs. The following table shows additional information on the different diagnostic error events, how to enable them, and the indicating LEDs.
| No. | Understanding the different diagnostic error events |
| 1 | "No user power" The power supply is insufficient or missing. The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):
"Enable power diagnostics"
|
| 2 | "High limit exceeded" The high limit of an analog input / output has been exceeded (output value greater than "+32511"). The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):
"Enable overflow diagnostics"
|
| 3 | "Low limit exceeded" The low limit of an analog input /output has been exceeded (output value less than "0" for Current, less than "-32512" for Voltage). The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):
"Enable underflow diagnostics"
Please see figure above for details. |
| 4 | "Wire break" The power circuit of an analog Current output is not closed. The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):
"Enable wire break diagnostics"
|
| 5 | "Short circuit" The contacts of an analog Voltage output are short-circuited. The following S7-1200 PLC LEDs will blink (color of blinking LEDs: red):
"Enable short circuit diagnostics"
|
Online diagnostics with STEP 7 Basic
When you have online access to your S7-1200 PLC with STEP 7 Basic, you can use the "Online & diagnostics" function:
- Go online to your S7-1200 PLC.
- Browse the "Project tree" for the entry "Online & diagnostics".
- Browse the navigation area of the "Online Access" window for the entry "Diagnostics buffer".
- Select a diagnostic error event from the "Events" table.
- Beneath the "Events" table, details on the selected event are displayed. Here, you will find the HW-ID, the channel number, and the event type.
Note
An "Incoming event" shows the beginning of an event.
An "Outgoing event" shows the end of an event.

Fig. 08
"IOstate" tag
The following table shows the possible I/O states of the "IOstate" tag.
| IO_state | Description |
| Bit 0 | Configuration correct:
|
| Bit 4 | Error:
|
| Bit 5 | Configuration not correct:
|
| Bit 6 | I/O cannot be accessed:
|
Requirements
- S7-1200 PLC
- Ethernet cable
- PG / PC
- STEP 7 Basic V10.5
- Diagnostics-capable signal module / board







