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.

Mapping stringIdentifier of kepware to nodeId

More
06 Sep 2023 14:25 #12072 by support
Please send me the server configuration so that the example code can be verified.

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

More
06 Sep 2023 14:00 #12071 by randhawa
Yes, this is KepServerEX.V6 server.
Attachments:

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

More
06 Sep 2023 13:35 #12070 by support
Hello.

This is with KepServerEX, right? If so, please send me the server configuration so that the example code can be verified.

Regards

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

More
06 Sep 2023 12:16 #12069 by randhawa
I am trying to create node id like "ns=2;s=Simulation Examples.Functions.User1" from "2:Simulation Examples/2:Functions/2:User1".
I am still not able to create nodeId . I am able to get browseElements using the suggestions mentioned. Can you please provide example to do something like this ?

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

More
01 Sep 2023 13:34 - 01 Sep 2023 13:35 #12058 by support
I do not know. You have to know. Or you need to explain what it is that you are trying to achieve.

You have asked for an example that is equivalent to calling TranslateBrowsePaths. And I have given you such example. The original example also needs the starting node - it is the 'nodeId' argument to the Read method. So, you would use the same node Id as the starting node Id in my example.

The sequence of browse node elements, by itself, is relative. It cannot be used to identify anything, without also knowing where it starts.

The relative browse path you have given as an example ("2:Simulation Examples/2:Functions/2:User1") can, for example, start at the standard "Objects" node in the server (use UAObjectIds.Object in QuickOPC to easily identify it). But I cannot know it for sure, I do not have your server/configuration.

Regards
Last edit: 01 Sep 2023 13:35 by support.

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

More
01 Sep 2023 13:01 #12057 by randhawa
Thanks for the code. But what would be the startingNodeId

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

More
01 Sep 2023 07:50 #12056 by support
Hello.

It can be done in several ways, one of them looks somewhat like this:

 
UANodeId startingNodeId = ...;
var browsePath = new UABrowsePath(startingNodeId, new[]
{
  UABrowsePathElement.CreateSimple(new UAQualifiedName(2, "Simulation Examples")),
  UABrowsePathElement.CreateSimple(new UAQualifiedName(2, "Functions")),
  UABrowsePathElement.CreateSimple(new UAQualifiedName(2, "User1")),
});
var nodeDescriptor = new UANodeDescriptor(browsePath);
 
 

Best regards,

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

More
31 Aug 2023 15:22 #12054 by randhawa
Can you please provide an example of doing this.
This is what I have currently and would need to create UANodeDescriptor for subscribing to data change
string browsePath = "/2:Simulation Examples/2:Functions/2:User1";
var browsePathParser = new UABrowsePathParser();
UABrowsePathElementCollection browsePathElements;
try
{
browsePathElements = browsePathParser.ParseRelative(browsePath);
}
catch (UABrowsePathFormatException browsePathFormatException)
{
Console.WriteLine("*** Failure: {0}", browsePathFormatException.GetBaseException().Message);
return;
}

// Display results
foreach (UABrowsePathElement browsePathElement in browsePathElements)
{
Console.WriteLine(browsePathElement);

}

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

More
29 Aug 2023 05:17 #12043 by support
Hello,
please read opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...wse%20Paths%20in%20OPC-UA.html .

In QuickOPC, you do not have to go trough the extra step of translating the browse path. You can specify the starting node and the relative browse path, and the translation will be done for you.

You need to construct the UANodeDescriptor which contains the BrowsePath. Inside the UABrowsePath, there is the starting node Id, and a sequence of browse path elements. In your example, you have just one browse element (in each path), so you would just add one element.

You will then use the constructed UANodeDescriptor with methods on EasyUAClient for reading, writing, subscriptions etc.

Best regards

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

More
28 Aug 2023 19:25 #12041 by randhawa
We are migrating are code from OPC.UA to OPCLabs.
Please see github.com/OPCFoundation/UA-.NETStandard-Samples/blob/master.../GdsDiscoverServersDlg.cs#L347
example using Read and TranslateBrowsePaths method to translate these nodes

Is this possible to do somethin g similar in OPCLabs to convert these browsepaths to nodeId
Attachments:

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

Moderators: support
Time to create page: 0.084 seconds