14:05, EEST
June 2, 2019
Hello,
Please correct me if I am wroong here.
When we talk about the subscriptions and monitored items, a particular node is subscribed to by the client, and on the change of values in the node , the client is informed about the change, The information reaches the client at every publishing interval, and the node updates itself with the new value at every sampling interval.
Now, I have an OPC UA server which has analog signals. The values vary, and I can see the changing values on UA Expert.
I also have a test application using prosys java sdk, which tests if subscription functionality works fine or not. The code is as follows:
dataItem = new MonitoredDataItem(nid, Attributes.Value, MonitoringMode.Reporting, samplingInterval);
dataItem.setQueueSize(queueSize);
dataItem.setDiscardOldest(true);
dataItem.setDataChangeListener(listener);
s.addItem(dataItem);
Here, now from what I understand, if the value of the nid changes, then they are reported to the client. I sleep the program for 5 seconds to see the total number of changes in the listener. Works fine as the signals are changing.
However, i have another server which does not have varying signals( value is always a constant). Inspite of the constant value, the above chunk of code produces values for the listener.counter . Could you tell me how is it possible? Only if the value changes, the counter increments is my understanding. Please tell me if there are any other scenarios as well…
15:25, EEST
Moderators
February 11, 2020
Hello,
MonitoredItems generate DataChange Notifications also when the Status of the monitored Node changes. The initial value of the monitored Node is also reported with a DataChange Notification, so you should expect to get at least one DataChange Notification for Nodes with constant values.
If you’ve set the Trigger parameter of your DataChangeFilter to STATUS_VALUE_TIMESTAMP_2, then you would also get a DataChange Notification whenever the SourceTimestamp of the monitored Node changes. If the OPC UA Server you’re testing with is changing the Status or the SourceTimestamp of the monitored Node, you would get DataChange Notifications even if the Value of the Node is constant.
17:08, EEST
June 2, 2019
8:00, EEST
Moderators
February 11, 2020
Hello,
The parameters of the filter and other Monitoring Parameters are specified in CreateMonitoredItems Service requests and the OPC UA specification allows Servers to revise them based on their capabilities. See https://reference.opcfoundation.org/Core/docs/Part4/5.12.2/ , https://reference.opcfoundation.org/v104/Core/docs/Part4/7.16/ and https://reference.opcfoundation.org/v104/Core/docs/Part4/7.17.2/ for more information.
Most Users Ever Online: 1919
Currently Online:
15 Guest(s)
Currently Browsing this Page:
1 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: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1