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.

Browse Nodes OPC-UA in Delphi

More
11 Oct 2016 07:57 #4441 by support
It appears that Basic256 or Basic128Rsa15 is being used as a security policy for the nonce data, but the server specified an empty algorithm for the signature (we expect RsaSha1).

I will check whether that's compliant with the OPC spec.

Regards

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

More
10 Oct 2016 11:32 - 11 Oct 2016 07:53 #4439 by RH
The hint "ExpandedText" was the one I needed, thank you. It works very good.

But now, I have an issue with another UA server. It is a Simatic Panel TP700 Comfort with an integrated OPC UA server. I attached a file with the exception description that your browse dialog provided. Where is the problem? With the tool "UaExpert" I can access and browse the server with no issues.
Attachments:
Last edit: 11 Oct 2016 07:53 by support. Reason: changed subject

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

More
30 Sep 2016 15:07 - 10 Oct 2016 18:41 #4412 by support
Thank you for describing your project.

I will provide example code if that proves necessary, but I do not think that is the case so far, because it is quite easy actually.

If you have a string form of the NodeId, just set it into the ExpandedText property of the UANodeId object. It will automatically parse it, and all other properties will change their values according to it.

If, however, you just want to use the Node ID returned from one browsing as the parent for new browsing, you do not even have to deal with the internals of the UANodeId. Simply take the whole NodeId reference returned to you from the browsing, and use it as a whole.

You are right that there is no custom/user filtering currently in our dialogs. This is on a list of possible future enhancements.

On the other hand, we do have a MultiSelect capability, if that's what you were also looking for. With that, the user can keep browsing through the tree, and keep "stacking" the chosen nodes, and then confirm the dialog when he is done. I am not sure if you were aware of the feature.

Best regards
Last edit: 10 Oct 2016 18:41 by support.

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

More
30 Sep 2016 14:46 #4411 by RH
Replied by RH on topic Browse Nodes OPC-UA in Delphi
Can you please post some sample code, how the nodeID provided as a String can be passed to the nodedescriptor.NodeID? There are quite a lot of properties in NodeID. Some short sample code with the least data in my case would be very helpful. I tried different versions, but I didn't get it to work.

With your dialog, filtering is not possible (I think). I implemented a wrapper for using OPC-UA variables with our existing general classes for I/Os. The only thing needed to instantiate an I/O with this class would be the nodeID. Copying all the single IDs for this purpose is not very nice when you have a lot of I/Os in a machine, so I want to implement my own browser wth some filtering and export functions to get the whole list of nodes and IDs needed. And of course, I can learn to understand the structure of OPC-UA a bit better by doing this ;)
When my colleagues later use my I/O wrapper in a software, it would be easier for them to get just the data they need in clear and easy way, to create the I/Os needed. Not everybody can go into detail with OPC-UA and I spent quite a lot of time to get into it.

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

More
30 Sep 2016 14:00 - 30 Sep 2016 14:02 #4410 by support
Yes, just take the NodeId from the returned element, and use it for the parent.

I addition (but it is not necessary), I recommend that you also use the browsePath from the returned element, and use it for the parent as well. This way 1) The browse path returned will actually "grow" from the original starting point (Objects, in your case), instead of starting over again at the parent node, and 2) if the user in the end selects something, and you persist both the node Id and the browse path, and want to start the browsing again at the same point, you will have the information needed for that (in the browse path; the NodeId won't tell you "how" to get there from the Objects).

All namespaces are already filled in in the browse path returned from the BrowseXXXX methods, therefore you do not need to deal with them in any way for passing it over to further calls.

May I ask you why are you re-implementing the browsing dialog yourself? Is there something specific missing in our component, or do you plan to have it very different from ours in the end? Can you elaborate on that? - we are always interested in the use cases from the real world.

Best regards
Last edit: 30 Sep 2016 14:02 by support.

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

More
30 Sep 2016 13:35 #4409 by RH
Replied by RH on topic Browse Nodes OPC-UA in Delphi
Thank you for your fast support. You already helped me quite a lot.


This is what my server looks like in your tool (I hope the attachments work):




I want to browse through the structure but I need some hint for getting there. What I have so far is the following (starting with the objects folder):



Can I browse using the nodeId of the current parent node? Do I need the DefaultNamespaceUriString when I have the nodeId like shown in my example?

Best regards
Attachments:

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

More
30 Sep 2016 12:16 #4408 by support
1. A COM equivalent of .NET UAObjectIDs.Server:

To achieve that, create a new NodeDescriptor (you have that already), and then do something like this (I have not tested it, but it should work; if not, let me know):
NodeDescriptor.NodeId.StandardName := 'Server';
In this case you even do not need to use any browse path, in the example that is for demo purposes to show how to use them.

2. In case you wanted to start at a specific place in the server: In our example we specify that place using a browse path from the 'Objects' folder, and for that we parse the browse path, and yes, in this case the DefaultNamespaceUriString is server-specific. We could have also used some "direct" NodeId (server-specific).

There are "standard" nodes in UA servers - for those you can use the approach in 1) above. For anything server-specific, you are on your own. Either you somehow "know" the NodeIds or browse paths (e.g. from the server documentation), or you obtain them by earlier browsing.

3. For browsing for data, you usually start with the 'Objects' folder. But there are other starting places as well (such as for object types, reference types etc.). Understanding of OPC UA spec is needed here to decide what you need - it is a large spec and I cannot explain that in couple of sentences here.

Best regards
The following user(s) said Thank You: RH

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

More
30 Sep 2016 11:44 #4406 by RH
Hi,

I'm evaluating the test version of QuickOPC 5.4 at the moment. Reading and writing values to a OPC-UA Server is pretty easy, as long as you find out the nodeIDs with your example dialogs. But I tried to implement my own browsing dialog in Delphi, but I'm facing some problems which I don't know how to handle.

Actually I couldn't figure out, what to pass to the EasyUAClient.BrowseNodes Method for parameter nodeDescriptor. In the reference, UAObjectIDs.Server is passed for start browsing from root, but I didn't find any Delphi equivalent.

I tried to modify this example for my needs:
EndpointDescriptor := CoUAEndpointDescriptor.Create;
EndpointDescriptor.UrlString := 'http://opcua.demo-this.com:51211/UA/SampleServer'; // I replaced this with my server URL
 
NodeDescriptor := CoUANodeDescriptor.Create;
BrowsePathParser := CoUABrowsePathParser.Create;
BrowsePathParser.DefaultNamespaceUriString := 'http://test.org/UA/Data/'; // What do I need here? Server specific?
NodeDescriptor.BrowsePath := BrowsePathParser.Parse('[ObjectsFolder]/Data/Static/UserScalar'); // What do I need to start at the objectsfolder or server root?
 
BrowseParameters := CoUABrowseParameters.Create;
 
// Instantiate the client object
Client := TEasyUAClient.Create(nil);
 
NodeElements := Client.BrowseNodes(
  EndpointDescriptor,
  NodeDescriptor,
  BrowseParameters);

I would really appreciate some sample code for this.

Best regards

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

Moderators: support
Time to create page: 0.062 seconds