03-13-2025 05:32 AM
Hi,
I am currently working on a project that involves OPC UA and I am looking for an example of an interactive OPC UA browser implemented in LabVIEW. Specifically, I am interested in seeing how to interact with OPC UA servers and browse their nodes using LabVIEW.
I found a similar thread: https://forums.ni.com/t5/LabVIEW/OPC-UA-browser-example-How-view-the-OPC-UA-servers-structure-OPC/td... where user @Jacobson-ni provided his own solution but it seems that this is not compatible with LV2018. If anyone has any example code or resources that could help, I would greatly appreciate it!
03-14-2025 03:35 AM - edited 03-14-2025 03:37 AM
What makes you believe that the project on Jacobsens Github repository is not compatible with LabVIEW 2018? The project file at least seems to be in 2017 format, so 2018 should be perfectly able to load that.
03-14-2025 07:30 AM
This solution is compatible with LV2018, as Rolf perfectly mentioned. However, it requires the NI OPC UA Toolkit installed.
I would like to recommend installing version 2018 (same as LabVIEW you have), because it appears that the latest version is not aware of LV2018 (at least, it's not available on my LV2018 after installation of 2022). Anyway, I've just tested it with LabVIEW 2025 Q1 (64-bit) and NI OPC UA 2022 Q4, using my own OPC UA server with five variables, and can confirm, it works.
03-14-2025 07:43 AM
Well when I tried to use it, i got errors complaining that I was "Missing Labview Tools Network Add-on" from the GOOP suite, and since I had the LV2018 Goop Suite installed I assumed that it used some outdated function that was not included in the 2018 GOOP. Which add-ons do I need to run this VI?
03-14-2025 07:56 AM
@Asasafuchi wrote:
Well when I tried to use it, i got errors complaining that I was "Missing Labview Tools Network Add-on" from the GOOP suite, and since I had the LV2018 Goop Suite installed I assumed that it used some outdated function that was not included in the 2018 GOOP. Which add-ons do I need to run this VI?
I believe the NI OPC UA Toolkit is the only one that needs to be installed. Attempting to open this solution in LV2018 without this toolkit installed results in the following:
No other errors raised except NI OPC UA SubVIs and according Refs.
03-17-2025 10:02 AM
By the way, the given browser doesn't need to be so deeply integrated with the OPC UA toolkit and can be "decoupled" because the Browse Name (to be displayed in the tree) is usually available at browse time. It's not necessary to walk over NodeIds and then obtain the name to display with Get Node Attribute inside of browser, something like that:
Attached is the code for LV2017 (VIs belong to a class with items in community scope that were reverted to public because community scope was introduced in LV2019). Also I added NodeId to the tree:
As a data source, I am using my own OPC UA Server/Client.
Disclaimer: Currently, I am learning the Rust programming language, and this is just a "weekend side project" based on the implementation of OPC-UA in Rust. This very rusty code can crash at many points, so use it at your own risk. Full source code is provided; feel free to modify it. However, please note that at this moment, the Rust code is licensed under the MPLv2, and the LabVIEW code is in the public domain (CC0 license). I will just leave it here; maybe it will be useful for you or someone else in the future.
03-18-2025 07:14 AM
Oh cool! Thanks for providing this nice solution. One question: how do I make the Node Ids selectable? For example if I wanted to select one that then gets added to a table or array. I have never used tree controls so I apologize for the question that might seem trivial.
03-18-2025 07:45 AM
Also I noticed that this list only displays the node ids and does not include the namespace identifier, do you know how these can be added?
03-20-2025 05:09 PM
@Asasafuchi wrote:
Also I noticed that this list only displays the node ids and does not include the namespace identifier, do you know how these can be added?
For a node ID with namespace=0, the namespace specifier is optional and often omitted.
03-21-2025 04:42 AM
How does this code work with certification? Do I need to modify the rust scripts so that I can add certification file paths, security policies etc?