I am looking for the best practice to overcome connection losses and guarantee integrity in data transmission with OPC UA. My research shows either using persistent subscriptions using a queue implemented in the server, or using OPC UA HDA.
Using subscriptions is not necessarily possible with the server and does not allow to manage long disconnections, even in the case where the server has restarted.
Using HDA seems more reliable, WinCC OA documentation explains how to do the queries but it is not very clear what can be done automatically or what must be done with script.
I am interested in your advice
How to handle connection loss with OPC UA HDA
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How to handle connection loss with OPC UA HDA
You have submitted the same question in the Siemens Industry Support.
Please refer to the answers provided in the service request.
If data shall be retrieved using OPC HDA you must implement functionality to read data on your own. There is no automatism which queries data when a connection is established.
Best Regards
Leopold Knipp
Senior Support Specialist
Please refer to the answers provided in the service request.
If data shall be retrieved using OPC HDA you must implement functionality to read data on your own. There is no automatism which queries data when a connection is established.
Best Regards
Leopold Knipp
Senior Support Specialist
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: How to handle connection loss with OPC UA HDA
We have a script to trigger the historical retrieval of values after a long connection loss.
The maxOutputQueueSize needs to be increased to be able to handle the extra values.
To be able to mark and write the values as correction values the config entries histDataBits & userBitHistoryRead are used. Writing them as correction values is needed otherwise they are marked as invalid due to the source timestamp being older than the values received on reconnect.
To avoid overloading the driver/event manager the retrieval is done in small periods of a couple of hours. The requestId is used to pass information to the callback function.
The maxOutputQueueSize needs to be increased to be able to handle the extra values.
To be able to mark and write the values as correction values the config entries histDataBits & userBitHistoryRead are used. Writing them as correction values is needed otherwise they are marked as invalid due to the source timestamp being older than the values received on reconnect.
To avoid overloading the driver/event manager the retrieval is done in small periods of a couple of hours. The requestId is used to pass information to the callback function.