Reconnection of client and monitored item refresh afterwards|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Reconnection of client and monitored item refresh afterwards
Avatar
Markus Bodlos
New Member
Members
Forum Posts: 1
Member Since:
01/18/2022
sp_UserOfflineSmall Offline
1
01/19/2022 - 04:09
sp_Permalink sp_Print

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

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
01/19/2022 - 10:56
sp_Permalink sp_Print

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?

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Shaji D R
Guest(s) 20
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1351
Posts: 4579