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
NodeID vs BrowsePath
January 11, 2018
20:53, EET
Avatar
ashiwalv
Member
Members
Forum Posts: 3
Member Since:
April 14, 2015
sp_UserOfflineSmall Offline

Hello All,

For an implementation, I need to clarify the doubt about using NodeID or Its BrowsePath.
For the server I am connecting to create own NodeID after every update to its software. As being client each and everytime I need to reconfigure all nodes with new NodeID and it make unnecessary a lot of work as there are 1000+ nodes need to configure.
I know TranslateBrowsePathsToNodeId would be an alternate solution for this issue but I would like to know if creating Static NodeID(at OPC UA Server) does make any sense rather than Browsing 1000+ nodes to get its NodeIDs?
and I also would like to know about what would be performance if we use Static NodeID vs TranslateBrowsePathsToNodeId service to identify 1000+ nodes?

Thank you very much!

January 12, 2018
10:53, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

Typically OPC UA servers do not dynamically change NodeIds between restarts. So in the normal situation the client application can safely cache the NodeIds and use the same NodeIds everytime.

However, based on the sentence “after every update to its software” I would understand that there has been larger changes in the OPC UA server software and in these situations it’s in principle possible that NodeIds change. If the NodeIds change, then you indeed need to reconfigure them. However, this should happen only seldom.

The original use case of TranslateBrowsePathsToNodeId service is that client application can be programmed by using TypeDefinitions. You can use it also as a “more convenient browse” but it’s good to know that there are some caveats. As an example, there’s no guarantee that BrowseNames are unique and this means 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.

It’s good to keep in mind that NodeId is the unique identifier of a Node in the server address space and NodeId is the concept that is used in all service calls. In other words, using static NodeIds would be the better option.

According to my understanding the performance question is not meaningful: of course it’s better to use NodeIds directly because browsing for the Nodes in every client restart is just an additional step. You would only use the dynamical NodeIds if you have no other choice.

Also, it’s good to note that NodeId structure contains NamespaceIndex which points to an index in server’s NamespaceArray. Usually the NamespaceIndexes do not change between server restart. However, the OPC UA specification does not require this and it’s possible that the NamespaceIndex order change much more often than NodeId identifiers otherwise would. For this reason, it would actually be better to store the NamespaceURI instead of the NamespaceIndex in the client. The most practical way is to convert the NodeId to ExpandedNodeId and back with methods

client.getAddressSpace().getNamespaceTable().toExpandedNodeId(nodeId)
client.getAddressSpace().getNamespaceTable().toNodeId(expandedNodeId)

Alternatively, you can do this in a more manual way with

int index = client.getAddressSpace().getNamespaceTable().getIndex(namespaceUri)
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
12 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: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1