Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Is this the correct way to retrieve nodeId when uaDataDialog1.MultiSelect = True

More
22 Nov 2020 15:55 #9215 by support
Yes, right.

As a less important note, clients that use only namespace index (and not namespace URI) for node identification are doing it wrong. A node with namespace 3 may have namespace 15 next time. The namespace URIs stay the same, and the client should persist namespace URIs, and look up the namespace indexes every time it opens a session. QuickOPC is doing it. The fact that most servers do NOT change the namespace indexes makes it appear like everything is OK, but it isn't, and all these clients are broken and will not work well with servers that change their namespace indexes.

Best regards

opcfoundation.org/forum/opc-ua-standard/opc-ua-update-namespaceindex/
The following user(s) said Thank You: micham

Please Log in or Create an account to join the conversation.

More
22 Nov 2020 14:05 #9214 by micham
Hi,

OK. Now I understand. I may browse a UA server and see that the item name is "SimulatedData.Signal". However, when I check the NodeId properties, I need to create a string representation for this item according to the following parameters:

NodeId.NodeIdType
NodeId.NamespaceIndex
NodeId.Identifier

The result may be something like:

ns=5;s=5:?ServerStatus/CurrentTime
or
ns=2;s=Tag1
or
i=2260

When I use the above strings. My OPC client registers the OPC items with no problems.

Problem is solved. Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 19:49 #9189 by support
This has nothing to do with the server. What gets transferred to/from the server in the OPC UA protocol are *not* these strings, just their individual parts. The formats discussed here are all assembled/disassembled on the client side, by OPC clients.

So, the answer to your question

How can I know what is the format of the NodeId that the OPC UA server expects?

is: You cannot know that, because there is no such thing. The server does not know anything about these formats. It only knows that, for your example, that:
- The namespace index is 2
- the identifier type is String
- the identifier value is "Tag1".

These three pieces above are sent in an encoded way to the server, but *not* as 'ns=2;s=Tag1', and neither as 'NS2|String|Tag1'. They are sent piece by piece, and according to the message mapping used in UA (binary, XML or JSON), they will look differently on the wire, but never as any of these formats.

So, you really need to know what your *client* is using, if the client uses a string representation for node Ids. If you post here several examples of how the correct node Ids for your client look like, it should be relatively straightforward to come with a piece of code that formats the node Id in that way.

Regards

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 19:33 #9188 by micham
Hi,

Now I understand how to build the nodeId string in my code.
nodeId = "NS" + values(i).NodeId.NamespaceIndex.ToString + "|" + values(i).NodeId.NodeIdType.ToString + "|" + values(i).NodeId.Identifier.ToString

But:
How can I know what is the format of the NodeId that the OPC UA server expects?

For example:
'ns=2;s=Tag1'
or
'NS2|String|Tag1'

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 18:44 #9187 by support
Hello.

Can you point me to the documentation that explains how to convert the nodeId object to a string?

Here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ace.UANodeId~ExpandedText.html .

But you already have this string, so I do not understand why you are asking the question. The issue might be, that it is not in the format you want.

The other software is an OPC client that we develop. We thought that the nodeId string format is a standard that should be the same for all OPC clients.

You are probably not developing an OPC UA client from scratch. That would be man-months to man-years of work. I think you must be using some library. Which library is it? If it represents the node Ids by strings, what is the expected format?

And No, the node ID format does not have to be the same for all UA clients. The node IDs, as such, are the same. But node IDs are not the same as the string representations of node IDs, I have already repeatedly stated that.

Let me know what is the cost associated with explaining how to convert the nodeId object to string.

QuickOPC has its format that is documented, and it is also documented how to obtain it (see above), and you are already obtaining it, so there is no cost at all.

Converting QuickOPC node IDs to some other format would most likely be easy too, but it is necessary to know WHAT the format is.

Regards

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 17:47 #9186 by micham
Hi,

Thank you for your answer. Can you point me to the documentation that explains how to convert the nodeId object to a string?

The other software is an OPC client that we develop. We thought that the nodeId string format is a standard that should be the same for all OPC clients.

What I mean is - if this format "nsu=http://opcfoundation.org/ReferenceApplications ;ns=2;s=Tag1" used in your UA demo application and working good, it should also be good for our OPC client. Am I wrong?

Let me know what is the cost associated with explaining how to convert the nodeId object to string.

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 16:21 #9178 by support
Upgrade assurance contract is for version upgrades. It has nothing to do with support. We support everybody the same way, with the intent to be that to the best of our capabilities, but there is no paid, guaranteed support for anybody.

I will provide help to extract the necessary information from our node ID object. That is, in fact, trivial, and documented.

As to how to put that together to work with other software, in principle that has nothing to do with us. Frankly, I think it is actually trivial as well, as long as you know what is the format the other software (which you have not even identified to me) expects. If you describe that, I will try to help you as well, but it is well outside the normal support scope.

Regards

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 16:13 #9176 by micham
I understand. Any way you can help me create a correct string representation of the nodeId?
Is this something we can expect from our annual upgrade assurance contract?

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 16:02 #9175 by support

Please Log in or Create an account to join the conversation.

More
18 Nov 2020 15:59 #9174 by micham
Hi,

Thank you for your answer. Do you have an example in VB.Net that shows how to it?

Thank you.

Michael

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.065 seconds