Diagnostics in User Program with S7-1200
All SIMATIC products have integrated diagnostic functions that allow you to detect and clear faults. The components automatically report a fault during operation and provide additional detailed information. Plant-wide diagnostics can minimize unscheduled downtimes.
This application example describes how to monitor a PROFINET IO system with different devices in the user program. The devices are connected to an S7-1200 controller via PROFINET IO. The devices detect faults on their modules and send the diagnostic data to the assigned controller. The controller evaluates this diagnostic information with the diagnostic instructions in the user program and saves it to a global data block. The operator panel graphically displays the evaluated diagnostic information in one view per IO system or in a device view.
It considers the following states:
- State OK
- State FAULTY
- State LOST CONNECTION
- State DEACTIVATED
- State PROBLEM / MAINTENANCE
- State WAS FAULTY
- State HAD LOST CONNECTION
- State WAS DEACTIVATED
- State WAS PROBLEM / MAINTENANCE
It is generally recommended to use the integrated system diagnostics of the S7-1200 controllers, when diagnostic information is displayed on different visualization devices and not used in the user program. Please note that the integrated system diagnostics also work in the "STOP" mode of the S7-1200 controller. This is not possible with the manual diagnostics in the user program.
The following screen shows the most important components of the solution with an S7-1200:
Documentation and example project for diagnostics in the user program
This example shows the diagnosis of a PROFINET IO system in the user program with up to 16 devices. The visualization of the diagnostic information is displayed on an operator panel.
Documentation (1,9 MB)
Project for STEP 7 V14 SP1 (4,3 MB)
Project for STEP 7 V15 (4,0 MB)
Channel diagnostics in user program of S7-1200 / S7-1500
Diagnostics in user program with S7-1500
Creating and using user-defined web pages on S7-1200 / S7-1500