Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Question regarding MonitoredDataItem class
August 10, 2021
14:05, EEST
Avatar
Rakshan
Member
Members
Forum Posts: 30
Member Since:
June 2, 2019
sp_UserOfflineSmall Offline

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…

August 10, 2021
15:25, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

August 10, 2021
17:08, EEST
Avatar
Rakshan
Member
Members
Forum Posts: 30
Member Since:
June 2, 2019
sp_UserOfflineSmall Offline

Thank you Matti. I want to know if this trigger is always set on the client side or does the server manufacturers have a default data change filter mechanism?

August 11, 2021
8:00, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 681

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1