Professional OPC
Development Tools

logos

OnDataChangeNotification - firing order

More
01 Mar 2018 10:48 #6085 by support
No, in the example you have provided, this is not always guaranteed. Our OPC client part does not rearrange the order of incoming notifications, but on the OPC communication level, they may already be ordered differently from what their true sequence was.

Leaving aside the communication between the OPC server and the PLC, and the way the OPC server is implenmented (for which both you will need to contact the OPC server vendor), order can be different e.g. precisely due to the factors you have mentioned (the sampling and publishing interval). And, even if both items were on the same OPC subscription and with the same parameters, I am not aware of a clause in the OPC specs that would strictly require the order be kept.

If keeping the order is important, I can think of following approach:
- Based the logic not on the order of notifications, but rather than on the source timestamps. This will require to delay the actual processing by certain amount, so that the incoming notifications can be sorted. And, the value of that delay will then become a critical parameter that "somehow" needs to be guaranteed (which will require precise analysis of all the communication path between the source and receiver to see what the maximum delay might be - if possible at all).
- Use some kind of handshaking (additional nodes) and algorithm to assure the ordered delivery. This would, effectively, change the logic you have described (and will require changes on the PLC side).

Best regards/MfG

Please Log in or Create an account to join the conversation.

More
28 Feb 2018 11:43 #6083 by Wagner
We subscribe to ~280 nodes of an Siemens OPC-UA server using SubscribeMultipleMonitoredItems.
If a value of a subscribed node changes the OnDataChangeNotification fires and we get the new value of the subscribed node.

This works fine.

My question is: Does the OnDataChangeNotification firing order always reflect the chronological order of the changes in the OPC UA server?

An example:

The PLC changes the value of node A at timestamp x
The PLC changes the value of node B at timestamp x + 1ms

Is it guaranteed that OnDataChangeNotification fires first for node A and then für Node B?
Or could it be that the new value of B is (sometimes) delivered before the new value of A depending on sampling interval, publishing interval or other timing parameters?



Kind regards

Robert

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.192 seconds

      

 Recommend this on Google