Using the diagnostics block FB125 from the S7 project "DP_DIAxx" the individual Profibus users can be diagnosed in a Profibus subnet. You can download the diagnostics block or the S7 project under the following Entry ID 387257.
You find the diagnostics screens adapted to the appropriate operator panels for ProTool and for WinCC flexible under the following Entry ID 5362473. If the operator panel is not in the download, use the download of the previous version of the operator panel.
Alternatively you can use the WinCC flexible Library that can be loaded at the end of the entry.
The following description explains how you incorporate the FB125 and the diagnostics screens for WinCC from the loadable library into your project:
||STEP 7 Open Manager
- Create a new project in STEP 7 and add all hardware components.
- Open the S7 project "DP_DIAxx".
- Copy the FB125 and DB125 or alternatively the FC125 into your project.
- Likewise add the OB82 and the OB86.
Call function block FB125 in OB1
- Call the FB125 including the DB125 in the cyclical program (for example OB1).
- Save and close the appropriate block - in the example OB1.
||Creating WinCC flexible project
- Select the project folder in the project path (1).
- Add a new WinCC flexible station via the menu "Insert > Station > SIMATIC HMI Station" (2).
For the Profibus diagnostics the WinCC flexible project must not necessarily be integrated in STEP 7. The requirement in the WinCC flexible project is the correctly configured connection to the controller in which the diagnostics block FB125 is called.
||Opening WinCC flexible project
- Select the newly-created SIMATIC HMI station in the STEP 7 project.
- Open the context menu with a right-click and click on "Open Project".
- Select an operator panel (for example MP377).
- In WinCC flexible configure the Profibus connection between controller and operator panel under "Communication > Connections".
Assign a clear user address.
||Open WinCC library
- Click on the toolbar (1) on "Library".
- Open the context menu of the library with a right-click (2).
- Under "Library..." choose "Open" (3).
||Adding WinCC flexible library
- Add by "Drag & Drop" the diagnostics screens of the opened library to the folder "Screens" in the project window.
- Add three buttons with the following designations:
- "Diagnostic Overview"
- "Detail Diagnostic"
- "Cable Diagnostic"
- In the properties of each button configure under the event "Print" the system function "ActivateScreen" with the appropriate diagnostics screen.
- Add another button in the diagnostics screens, to change to the Start picture.
- Connect the controller physically with operator panel.
- Load the STEP 7 project into the appropriate controller.
You can also use the option package "PLCSIM" to verify the diagnostics block.
a) Verifying a real system
- Transfer the WinCC flexible project into the operator panel or use the WinCC flexible PC-Runtime.
- Switch the controller into the "RUN"-mode.
b) Simulation with PLCSIM
- Open the option package "PLCSIM".
- Load the STEP 7 configuration including STEP 7 program into the PLCSIM Station.
- Switch the controller into the "RUN"-mode.
- In the "PLCSIM" menu via "Execute > Trigger Error OB" click on "Rack Failure (OB86)...".
- Switch to the "DP Failure" tab.
- Select a configured DP Slave and then select "Station fault".
- Then click on the "Apply" button.
For the simulation with PLCSIM further illustrations are avoided, because the subsequent instructions are almost identical.
||Verifying diagnostics blocks
- Start the WinCC flexible Runtime.
- Click on the button "Diagnostics overview".
- With the real system cause a disturbance (for example separate a configured DP slave from the Profibus network).
- Click on the button with the "magnifying glass", to change the screen to "Diagnostics details".
- Change to the screen "Cabling diagnostics", by clicking on the second button below see Fig. 09.
- Close PLCSIM as well as the WinCC flexible PC Runtime.
In the attachment 1 you will find the library described above, available from WinCC flexible 2007.
Attachment 1: WinCC_flexible_Library_FB125.zip ( 10197 KB )
In Attachment 2 you will find the sample project described above. The current FB125 is available for downloading under the Entry ID 387257.
Attachment 2: Example_FB125.zip ( 3123 KB )
Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.
||Product and version designation|
|PC operating system
||Microsoft Windows XP SP2|
||STEP 7 V5.4 SP3|
||WinCC flexible 2007 HF 4|
Profibus diagnostics, DP Slave diagnostics