16:39, EET
May 7, 2018
I have a question to the behaviour of the Prosys OPC UA Modbus Server. When subscribing a node, the server always first sends status code Bad_WaitingForInitialData with value null, immediately followed by the actual value of the Modbus device with status code GOOD. In our application the first response after subscribing is expected to be the initial data of the device (not the second response).
Is it correct that the Prosys OPC UA Modbus Server behaves like that?
For our application, this is an essential difference! When the application connects to the server and subscribes all nodes, the first response will be handled as the initial data from the server even if the status code is Uncertain or Bad. This is registered as the server’s current state for all nodes. When the second response of values are reported by the Prosys OPC UA Modbus Server, they are handled as value changes and the application starts to evaluate and react to those changes.
We are connecting and subscribing many different OPC UA servers from our application and each of them first send the actual current (device) state of a node upon subscription. New we have one system integrator testing the Prosys OPC UA Modbus Server and we encounter this problem.
18:11, EET
April 3, 2012
Hi,
Thanks for the question. It is intentional and according to the OPC UA Specification.
Spec 1.04 Part 4 section 7.34.2 Table 178 last entry:
“Bad_WaitingForInitialData Waiting for the Server to obtain values from the underlying data source.
After creating a MonitoredItem or after setting the MonitoringMode from DISABLED to
REPORTING or SAMPLING, it may take some time for the Server to actually obtain
values for these items. In such cases the Server can send a Notification with this status
prior to the Notification with the first value or status from the data source.”
i.e. an OPC UA Client can _never_ assume the first notification to be a “real” notification.
Additionally Table 160 in section 7.20.2 for the DataChangeNotification Value field:
“Value DataValue The StatusCode, value and timestamp(s) of the monitored Attribute depending
on the sampling and queuing configuration.
If the StatusCode indicates an error then the value is to be ignored.
If not every detected change has been returned since the Server’s queue
buffer for the MonitoredItem reached its limit and had to purge out data and
the size of the queue is larger than one, the Overflow bit in the DataValue
InfoBits of the statusCode is set.”
Therefore you should always check the status as well (in ALL notifications).
This is somewhat a trade-off between making the items fast and sending that as first notification vs. waiting for the data. The current design in the latests versions avoids some problems if a client makes 100s of monitoreditems at once. We could revisit that at some point (or maybe add some options), however the current impl is something any UA Client should be able to handle.
Most Users Ever Online: 1919
Currently Online:
42 Guest(s)
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1