04/07/2022
We have a setup where OPC UA client subscribe to some nodes (monitored items) in OPC UA server (inside PLC).
The client also occasionally write to the same monitored items and gets the change notification from server.
The issue is, under certain conditions, when the client writes to a monitored node and the PLC logic at server revert the value to previous state.
This revert operation happens so fast that the OPC UA server do not detect this change and do not send any change notification to client.
The client assumes that the node was updated successfully but actually it was not.
One solution is that the client should read the server node after every write operation to confirm if the write operation was successful.
Another solution is that the client wait for change notification from server to confirm if the write was successful.
My question is if there any OPC UA service request (or any other way) that can be sent to OPC UA server to send back value of a specific monitored item?
I know that client can read any node in the server by sending a read request but here I want that the server should send current value of a monitored item.
05/30/2017
What you need to do is use a SamplingInterval that is much faster than PublishingInterval AND set a QueueSize large enough to ensure that all changes within the PublishingInterval are reported.
i.e. PublishingInterval=1000ms, SamplingInterval=100ms, QueueSize=11
So when you do a write that is immediately reverted you should get 2 data changes on the next publish for a single monitored item provided the revert takes longer to happen than the SamplingInterval.
04/07/2022
Randy Armstrong said
What you need to do is use a SamplingInterval that is much faster than PublishingInterval AND set a QueueSize large enough to ensure that all changes within the PublishingInterval are reported.i.e. PublishingInterval=1000ms, SamplingInterval=100ms, QueueSize=11
So when you do a write that is immediately reverted you should get 2 data changes on the next publish for a single monitored item provided the revert takes longer to happen than the SamplingInterval.
Thank you Randy!
I will try this approach and reply you back.
1 Guest(s)