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
Single notification event for several subscriptions
March 15, 2024
8:29, EET
Avatar
Hendrik Ulbrich
Member
Members
Forum Posts: 14
Member Since:
June 27, 2018
sp_UserOfflineSmall Offline

Is it possible to create several subscriptions for which only ONE publish event is generated?

We have seen at protocol level that a Siemens PLC virtually combines several subscriptions with the same PublishingInterval and SamplingInterval. The PublishRequests are answered with a SINGLE PublishResponse containing an array of MonitoredItemNotifications.

In the Java program, I set the same MDIListener object for each MonitoredDataItem. However, each subscription receives its own onDataChange event.

Our goal is to create multiple subscriptions and have them behave like a single subscription to a structure/variable.

Is this possible?

March 15, 2024
9:30, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

I will assume some OPC UA terms were mixed in the question, because using the literal interpretation it would be impossible in the “protocol OPC UA level” to do any sort of “merging” of Subscriptions. A single PublishResponse (https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.5) is always keyed to a single subscriptionId i.e. it would not be possible to “merge” 2 different subscription notifications that is sent to the client.

However please note that in OPC UA the term ‘Subscription’ means a collection of MonitoredItems. Thus you most likely would be interested in com.prosysopc.ua.client.SubscriptionNotificationListener.onNotificationData(Subscription, NotificationData) attached to the Subscription object if you wish to handle the notification in “bulk style”. SDK just also splits this data automatically for you for the item-level MonitoredDataItemListener.

Note that in general for most use-cases the item-level listener is all that should be needed. OPC UA doesn’t give any “atomic guarantees” between the items. For example, if you have received the newest values, then on the server side the node updates, the sampler might run at the same time and you will get a notification with just some of the nodes. Then on next sampling (+publishinterval) you would get the rest. And for example if the data changes constantly you might get the newest value for some of the nodes but the “second newest” for some for a similar kind of scenario with the sampling. The only way to get a true snapshot would be to use a Structure type on a single node in the server and have that hold all data. Note that it is server-specific how the sampling works. Also, depending on the parameters of the Subscription and the server, if there are a lot of items a single notification might not hold all data changes, you might get multiple ones for a single publish interval.

If that didn’t help then I would need some clarifications on the question.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
9 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

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer

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