Jump to content

Get Node ID of a vaiable using OPC UA client


Recommended Posts

Thank you for the reply.

 The problem is that i have a list of some predefined PLC signals saved as csv-File that need to be forced on LabVIEW Frontpanel. To write and read that signals using OPC UA tool to/from PLC, i need to know for each signal read from the csv-File what is the node Id. The easy way to do so is to read the file and assign for each signal the corresponding NodeID. Perhaps there are others alternatives but at the moment it what im thiniking to do. I actually don't know how i can extra dynamically the nodid of signals and sign each with the corresponding signal name of the csv-File.

 

Link to comment
On 12/9/2024 at 5:28 PM, baggio2008 said:

Hello everyone,

It is possible to get the NodeID of a variable from an OPC UA server using OPC UA client toolkit?

Thanks

How is that name created? Variables in OPC-UA are really only known by their node ID anyways. This can be a string node ID that gives you a name, but that is entirely depending on the server configuration as to what that string would be if any. There is no way that you can have some random string name and let the server answer you with what node ID that could be, since a node is simply known by its node ID and nothing else.

So the real question is how did that string name in your spreadsheet file get generated? Is it the string part of a string type node ID with removed namespace part?

Link to comment
2 minutes ago, baggio2008 said:

Hi Dear,

the File contains a generated string part of  the node ID. Based on that string i would like to get the node ID.

Thank you.

You can't automatically. There could be the same name in several namespaces. You will have to browse the various namespaces and search for that specific name. That can be done with the BrowseForward function programmatically. Or if you know in which namespace they all are, you can reconstruct the NodeID string of course yourself, something like ns=1;s=your_string_name or if it is an uri namespace: nsu=https://someserver/resource ;s=your_string_name

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.