How do I avoid that the CPU shows a bus error after MOBILE panel 170 was removed by using DP direct buttons of the connection box of PROFIBUS DP?
The MOBILE panel 170 is operated with functionality of DP direct buttons, i. e. as DP slave on PROFIBUS DP. If the panel is plugged off the connection box, the CPU, which is used as DP master, indicates a bus error. The bus error lasts until the panel is plugged to PROFIBUS DP again.
This bus error is caused by the fact that the MOBILE panel 170 is registered as active in the polling list of DP master. Thus DP master tries to communicate with the panel. To remove the MOBILE panel 170 from the polling list, call SFC12 in your S7 programm. SFC12 can be used to deactivate and to activate DP slaves.
If you have activated a DP slave with SFC12, then its process outputs will be set to the substitute value 0 (safe mode), or they accept the designed substitute behaviour. DP master does no longer contact DP slave subsequently. Deactivated slaves are not displayed on the DP master as faulty or missing. Neither are there entries in diagnostics buffer as a consequence.
Once DP slave is connected to the PROFIBUS DP, you activate it via SFC12 . Then the DP slave is entered in the polling list of the DP master. The communication between DP master and DP slave is re-established.
Activating and Deactivating DP Slave Functionality of MOBILE panel 170
- Deactivating of the DP Slave Functions of the MOBILE Panel 170
If the MOBILE panel 170 is operated as DP slave on PROFIBUS DP, there will be bus errors in the CPU (DP master) after the communication between the panel and the DP master is disturbed. Reason of a communication disturbance can also be, for example, the removal of the unit from the connection box. In order to deactivate the DP slave functions of the Panels in this case, you can call the SFC 12 with parameter MODE:= 2.
An example of calling SFC12 can be found in Entry-ID: 5608020 "Functions & Samples: Deactivating and Activating of DP slaves".
You detect a faulty communication between the panel and the CPU using the "life bit". The life bit is a bit in area indicator "Coordination" which must be configured in the ProTool project for MOBILE panel 170. During a communication between the panel and the CPU, this bit changes its status roughly by the second. If the communication is faulty, the bit keeps its status. Through a digital input (24V), that needs to be wired to the connection box with clamp bar , it can be checked, if the mobile panel is plugged onto the connection box. If the MOBILE panel is not plugged, SFC12 (deactivating the DP slave) must be called.
An example of evaluation of the life bit of the system can be found in Entry-ID: 13987985 "Functions & Samples: Monitoring of the Connection between a Panel and the System".
- Activating DP Slave Functions of MOBILE panel 170
If the MOBILE panel 170 is plugged again to PROFIBUS DP and then the ProTool runtime was started on the unit, you can activate the panel als DP slave through calling of SFC12 with MODE:=1 .
An example of calling the SFC12 can be found in Entry-ID: 5608020 "Functions & Samples: Deactivating and Activating DP slaves".
DP slave functions should be activated only after the panel was connected again to the connection box and ProTool runtime was started on the unit. This behaviour can be recorded by evaluating the start-up and the life bit. These bits are included within area indicator "Coordination" that must be configured in the ProTool project for MOBILE panel 170.
After a restart the start-up bit is set temporarily to "TRUE", and hence indicates a start-up of the unit. During an existing communication between the panel and the CPU the life bit changes its status roughly by the second. If the panel is plugged to the connection box again, and if in ProTool runtime the communication between der CPU and the panel (as active participant) is set up, you can activate DP slave functions again through calling SFC12.
An example of evaluation the life and the start-up bit of the systen you find in Entry-ID: 13987985 "Functions & Samples: Monitoring the Connection between a Panel and the System".
STEP 7 and ProTool Project as Download
The example contains a STEP 7 V5.2 project with a CPU 315-2DP and a MOBILE panel 170. It was designed with STEP 7 V5.2 SP1 and ProTool Pro CS V6.0 SP2. The example contains above described functionality.
Dp_mobil.exe ( 460 KB )
Copy file "Dp_mobil.exe" into a separate directory. Unpack the STEP 7 project, and all relevant subdirectories, with the integrated ProTool project. Then open and edit the unpacked project with the SIMATIC Manager and the integrated ProTool.
BF, Bus Errors, WinCE