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
get NodeId of a Node, knowing only the BrowseName value of the node
March 8, 2018
11:59, EET
Avatar
AlGor
Member
Members
Forum Posts: 4
Member Since:
February 1, 2018
sp_UserOfflineSmall Offline

Hello,
I have been working on an OPC UA Android client.
I have implemented subscriptions for specific nodes. However I had the “luxury” to know the NodeIds of the nodes I want to subscribe.

As next step I want to be able to get these NodeIds only by knowing the “BrowseNames” of the nodes.

I guess i have to browse throught the AddressSpace and search for a node with the specific BrowseName.

Thank you

March 8, 2018
14:52, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

You have understood correctly that in order to make a subscription, you need to know the NodeId of the node. The NodeId uniquely identifies a Node in an OPC UA server. It’s used to address the Node in OPC UA services. When you’re connecting to an unknown OPC UA server for the first time, you do need to find out the NodeIds by some mechanism. The mechanism can be OPC UA browse service calls, or alternatively it can be a configuration file supplied by the administrator of the application.

There’s no mechanism to automatically find out a NodeId corresponding to a given BrowseName. So, you have understood correctly that you need to browse through the AddressSpace in order to find out the NodeIds. However, it’s good to note that typically OPC UA servers do not dynamically change NodeIds between restarts. In the normal situation the client application can safely cache the NodeIds and use the same NodeIds everytime.

I would also like to mention that there’s a service called TranslateBrowsePathsToNodeIds which can be used to find out the NodeId of a Node in certain BrowsePath. In certains situations, this can function as a “more convenient browse”. The original use case of TranslateBrowsePathsToNodeId service is that client application can be programmed by using TypeDefinitions.

In the end, it’s also good to note that there may be some caveats when using BrowseNames. The main point is that there’s no guarantee that BrowseNames are unique like NodeIds. For example, it’s possible that TranslateBrowsePathsToNodeId service may return an array of NodeIds. Then you need to be able to decide which one of the NodeIds is the correct one.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

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