01/18/2022
Hi,
I have some troubles with my Ua Client reconnecting to a OPC server (Siemens PLC 1518) and obtaining monitored item changes during the connection loss.
Environment:
- .net 5, C#
- Ua.Cient and Ua.Core and Ua.Configuration 1.4.367.75
- Server Siemens 1518 PLC
I have a lot of subscribed monitored items. What I would like to achieve is that in case of a network failure a reconnect should start, after the reconnect is successful the client should update all monitored items (if the value changed in the meantime).
I implemented already a reconnect via SessionReconnectHandler which basically works and reconnects to the server. After the reconnect I call "ConditionRefresh()" for every used subscription as I thought this will update changes which happened during the connection loss. However, this works not every time as I saw two cases:
1) Short network interruption (< ~15s), reconnect establishes session with same session ID as before. ConditionRefreh() indeed updates monitored item changes which happened during connection loss.
2) Longer network interruption(> ~15s), reconnect establishes session with new session ID (old session got closed). ConditionRefreh() does not update any changes which happened during connection loss.
Is there a way to achieve what I want?
Â
Thanks!
Markus
05/30/2017
ConditionRefresh is for Conditions. It has no effect on data changes. It sounds like you are expecting it to do something for data items.
This section describes the reconnect logic that should happen:
https://reference.opcfoundatio.....Part4/6.7/
Can you confirm that you are implementing this logic?
1 Guest(s)