Update value on demand | OPC UA Implementation: Stacks, Tools, and Samples | Forum

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
Update value on demand
Avatar
Peter Franklin
Member
Members
Forum Posts: 7
Member Since:
04/14/2020
sp_UserOfflineSmall Offline
1
09/21/2020 - 18:07
sp_Permalink sp_Print

Hello, I am implementing an OPCUA server based on the .NET Standard reference implementation, and I'm very new to OPCUA.

I want to update a value on demand when a client requests, so that it is ensured to be the latest value from the backend database. I'm trying to determine where is the correct place to do this update of the value? Is there a method that I need to override somewhere or something like that? Is there an example in any of the samples anywhere? I couldn't find an example that worked this way. All of the samples either seem to initialize the value at startup, or simulate it changing all the time, but none of them seem to update it when requested by the client.

Thanks in advance.

Avatar
Randy Armstrong
Admin
Forum Posts: 532
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/22/2020 - 10:34
sp_Permalink sp_Print

The simulations run in a separate thread so the update is technically "on demand".

Use the same APIs but call it from your backend notification thread instead of using the timer.

Avatar
Peter Franklin
Member
Members
Forum Posts: 7
Member Since:
04/14/2020
sp_UserOfflineSmall Offline
3
09/22/2020 - 17:07
sp_Permalink sp_Print

Thank you for your reply. I'm not sure if I explained clearly what I'm asking though. I don't want to automatically keep updating the value of every node in the system. What I'd like to do is only update the value when it is requested by a client.

I have a back-end SCADA system that is getting updates frequently and that is where the source data values are stored. There can be hundreds of thousands of different points getting updated. I'm not going to have every single point in the system hooked up to a notification thread unless the client subscribes to it. I think I already understand how to do that.

What I'm asking about is just the simple case of a client browsing to a node and requesting the current value. Is there an event or method override that I'd need to hook into where I'd read from my back-end SCADA system, to set the value before the it is read and returned to the client?

Forum Timezone: America/Phoenix
Most Users Ever Online: 202
Currently Online: Mircea-Stefan Radu
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 9
Topics: 796
Posts: 2359