Hi,
We are trying to troubleshoot a bad behaviour of our system. When we open a panel it automatically calls many dpConnects to update the view of different displays. However, if the system providing this information is not available right now, these dpConnect never connect as the DP does not exists by opening the panel.
I have being reading the help and I think we are going to try using the systemConnect() with event "dist" to re-initialize the panel every change of connection status in the needed systems.
Is this a good way to solve the problem or has someone any idea or code they are already using?
Way to react to a system disconnected in a DIST system
- alaralum
- Posts:22
- Joined: Mon Jan 09, 2017 9:56 am
Way to react to a system disconnected in a DIST system
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Way to react to a system disconnected in a DIST system
The dpConnect() will fail if it is made before the manager has loaded the identification for the remote system.
When the identification is known the dpConnect() can be made even if the system is not connected at the moment. When the connection is reestablished you will get the hotlink messages.
The sysConnect() function can be used to detect when a system is connected or disconnected.
When a system is connected it is not guaranteed that the identification is already exchanged.
Maybe it is better to connect to the DP element _DistManager(_2).State.SystemNums. At this dp element the information is written for the system where the identification is loaded.
Possibly you can use another approach by saving the dp identification in your local project. When starting the manager the identification is loaded even if the dist system is not connected.
For details please have a look at the WinCC OA Documentation when searching for "useLocalIdentification".
Best Regards
Leopold Knipp
Senior Support Specialist
When the identification is known the dpConnect() can be made even if the system is not connected at the moment. When the connection is reestablished you will get the hotlink messages.
The sysConnect() function can be used to detect when a system is connected or disconnected.
When a system is connected it is not guaranteed that the identification is already exchanged.
Maybe it is better to connect to the DP element _DistManager(_2).State.SystemNums. At this dp element the information is written for the system where the identification is loaded.
Possibly you can use another approach by saving the dp identification in your local project. When starting the manager the identification is loaded even if the dist system is not connected.
For details please have a look at the WinCC OA Documentation when searching for "useLocalIdentification".
Best Regards
Leopold Knipp
Senior Support Specialist
- alaralum
- Posts:22
- Joined: Mon Jan 09, 2017 9:56 am
Re: Way to react to a system disconnected in a DIST system
Thanks Mr. Knipp for your always helpful Tipps!
I understand it would be helpful using the "useLocalIdentification" on the Dist entry of the configs. It would keep a registry of every DP connected from different systems on our Distributed network even if system is not available at this moment and also improve the performance by exchanging only deltas. Am I right?
We have always use a dpExists previous to dpConnect to avoid errors when DP is still not available, however it also avoids to access the DP if the system is not connected. Is it recommendable to do a dpExists for the described behaviour or would you recommend us to do the dpConnect always directly?
I understand it would be helpful using the "useLocalIdentification" on the Dist entry of the configs. It would keep a registry of every DP connected from different systems on our Distributed network even if system is not available at this moment and also improve the performance by exchanging only deltas. Am I right?
We have always use a dpExists previous to dpConnect to avoid errors when DP is still not available, however it also avoids to access the DP if the system is not connected. Is it recommendable to do a dpExists for the described behaviour or would you recommend us to do the dpConnect always directly?