Can I write a tag that is minitored in a Session.Notification event|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
Can I write a tag that is minitored in a Session.Notification event
Avatar
opcdevel
New Member
Members
Forum Posts: 2
Member Since:
06/14/2017
sp_UserOfflineSmall Offline
1
12/08/2022 - 07:25
sp_Permalink sp_Print

Hello,

I use some OPC UA dll from the SDK (OPC.Ua.Client.Dll and OPC.Ua.Core.Dll), with KEP Server EX OPC Server in C#.

I need to know first if it is allowed in a Session.Notification handler of a subscription, to write a value to a tag that is monitored by that subscription.

Because, what I tried to do is to delete the subscription before writing that value (beacause I was afraid that the write would generate a notification event again), and, the hmi program still works, but when I do that, opc communication speed appears to be a lot slower.

Regards,

Xavier

Avatar
Randy Armstrong
Admin
Forum Posts: 1455
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
12/08/2022 - 08:37
sp_Permalink sp_Print

Why is getting an update after a write a problem?

Avatar
opcdevel
New Member
Members
Forum Posts: 2
Member Since:
06/14/2017
sp_UserOfflineSmall Offline
3
12/09/2022 - 01:43
sp_Permalink sp_Print sp_EditHistory

Ok, it's not a problem, it works.
I thought that it could be a problem, thank you.

I have some other questions regarding the Session.Notification event.
It seams that if an event is not finished, a new event can happen and execute in another thread ?
Can a notification event take for example as much as 200 ms, for example to update HMI graphics or is it a problem ?

Avatar
Randy Armstrong
Admin
Forum Posts: 1455
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
12/09/2022 - 18:29
sp_Permalink sp_Print

The Session object is multithreaded. You need to design accordingly.

Note that you generally cannot update UI controls from the callback threads and if you block waiting for access to the UI you could see deadlocks.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 13
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1353
Posts: 4586