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.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Discovery, Browsing, Browse Dialogs and Controls
- Is this the correct way to retrieve nodeId when uaDataDialog1.MultiSelect = True
Is this the correct way to retrieve nodeId when uaDataDialog1.MultiSelect = True
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/
Please Log in or Create an account to join the conversation.
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.
So, the answer to your question
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:How can I know what is the format of the NodeId that the OPC UA server expects?
- 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.
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.
Here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ace.UANodeId~ExpandedText.html .Can you point me to the documentation that explains how to convert the nodeId object to a string?
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.
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?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.
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.
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.Let me know what is the cost associated with explaining how to convert the nodeId object to string.
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.
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.
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.
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.
Please Log in or Create an account to join the conversation.
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.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Discovery, Browsing, Browse Dialogs and Controls
- Is this the correct way to retrieve nodeId when uaDataDialog1.MultiSelect = True