Community project: OPC UA Any BrowsePath Finder

:magnifying_glass_tilted_right: OPC UA Any BrowsePath Finder

Finding a variable in an OPC UA Client browser is straightforward. Configuring its RelativePath for OpcUa_any in Automation Studio requires some more effort.
You need to reconstruct the hierarchy using the correct BrowseNames and escape reserved characters. If StartingNode is empty, the path must also include the complete route from Root.

Even a familiar-looking name can require a different representation. For example:

  • Node.1 becomes Node&.1.

  • Node/1 becomes Node&/1.

  • The B&R default scope :: becomes &:&:.

For task variables or nested structures, these details quickly add up. A missing path segment, an incorrectly escaped character, or a mismatched namespace index can prevent the configuration from resolving the intended variable.

I built a small Windows utility to simplify that step: connect to the OPC UA server, browse its address space, select the required variable, and copy its complete RelativePath.

:gear: Features

  • Expandable server browser that loads nodes as you navigate.

  • Direct variable selection without entering its name.

  • Complete RelativePath generation from Root.

  • Copy button for transferring the path into Automation Studio.

  • Mapping of supported OPC UA data types to IEC data types.

  • Anonymous and Username/Password authentication.

  • Configurable security modes and policies.

  • Automatic client application certificate generation.

  • Server certificate approval using SHA-256 fingerprints.

  • Standalone Windows executable—no Python installation required.

:rocket: How it works

  1. Enter the server endpoint and connection settings.

  2. Click Connect.

  3. Expand the server tree and navigate to your variable.

  4. Select the variable to display its IEC data type and complete path.

  5. Click Copy and use the result in your OpcUa_any configuration.

The generated path includes Root and Objects, so StartingNode should be left empty when using this path.

:clapper_board: Demo

OpcUaAnyBrowsePathFinderDemo

:down_arrow: Download

The source code and Windows release are available on GitHub:

:backhand_index_pointing_right: OPC UA Any BrowsePath Finder on GitHub

:backhand_index_pointing_right: Download the latest release

:memo: Current limitations

  • Generated paths retain the server’s namespace indexes. Check that these match your OpcUa_any namespace URIs configuration.

  • Data type detection currently covers the types listed in the README.

  • Client application certificates are generated automatically; importing an existing certificate and private key is not supported.

  • Certificate-based user authentication is not supported.

  • Server trust uses manually approved fingerprints. Full certificate-chain, hostname, expiration, and revocation validation are not implemented.

:speech_balloon: Feedback

Feedback, bug reports, and improvement ideas are welcome!

If you try it with another OPC UA server, I’d be interested to hear how it works for your setup. You can reply here or open an issue on GitHub.

9 Likes

Great Job Filipe !! Thanks

1 Like

With the new AS6 UA_Browse fub you don’t the full browsepath anymore.
For tasks and global variables the UA_Browse fub can deliver all needed UANodeID’s.
First browse all objects in 6,‘::’ which delivers all tasknames and AsGlobalPV object:

 fbBrowse.BrowseDescription.StartingNodeID.NamespaceIndex := 6;
 fbBrowse.BrowseDescription.StartingNodeID.IdentifierType := UAIT_String;
 fbBrowse.BrowseDescription.StartingNodeID.Identifier := '::'; 
 fbBrowse.BrowseDescription.Direction := UABD_Forward;
 fbBrowse.BrowseDescription.NodeClass := UANCM_Object;
 fbBrowse.BrowseDescription.ResultMask := UABRM_BrowseName + UABRM_DisplayName;

and then browse these found objects with NodeClass := UANCM_Variable;

 fbBrowse.BrowseDescription.StartingNodeID := StartingNodeID[j];
 fbBrowse.BrowseDescription.Direction := UABD_Forward;
 fbBrowse.BrowseDescription.NodeClass := UANCM_Variable;
 fbBrowse.BrowseDescription.ResultMask := UABRM_BrowseName + UABRM_DisplayName;

This results in the following:

2 Likes