Jump to content
News about the LabVIEW Wiki! Read more... ×

Recommended Posts

Hi,

Has anyone gone down the road of evaluating or has experience implementing the OPC UA architecture? There are a couple of toolkits out there so thankfully there is no real need to tackle the OPC .NET API. At this point I'm trying to fetter the tech side of it. What were the unexpected roadblocks you ran into?

If anyone can share their experiences it would be appreciated.

Thanks!

Share this post


Link to post
Share on other sites

I have used the NI OPC-UA toolkit in a bunch of projects. Both as a client and server.

Had an issue with an earlier version of the toolkit (2015) where it was not working correctly with authentication, but NI released a patch for that.

The only other strange thing is that the client (or server, cannot remember which it is) does not support Data Change events, so you have to poll. Oh yes the other weird thing is that when you do get a Data Change event you get the data coming in as a variant, but unlike regular variants this one seems to know nothing about its own type. This actually caused a bit of drama for me but managed to find a work-around as the data change event does actually include the type, so I was able to shove it back into the variant.

Share this post


Link to post
Share on other sites
5 hours ago, Neil Pate said:

Oh yes the other weird thing is that when you do get a Data Change event you get the data coming in as a variant, but unlike regular variants this one seems to know nothing about its own type. This actually caused a bit of drama for me but managed to find a work-around as the data change event does actually include the type, so I was able to shove it back into the variant.

Yuck. Has NI been prodded about this?

Share this post


Link to post
Share on other sites
5 hours ago, JKSH said:

Yuck. Has NI been prodded about this?

No, I didn't raise it with them at the time as I was a bit too busy trying to finish the project and then forgot about it.

Share this post


Link to post
Share on other sites

I wasn't the one to do this, but someone here evaluated it and had issues with performance -- it seemed to all be running in a relatively single-threaded way, even on the server. Also, the newer features (alarms, etc) took up a ton of memory compared to what we expected. However performance issues are always tied to a use case -- should be easy to grab an eval and test.

Because of the way that OPC UA data models work, the NI server shows up kind of strangely in third party clients. It probably works fine for more advanced tools like kepserver, but I was playing with a fairly low level python client and the representation was weird to me. If you want to use a 3rd party client I'd also grab the eval and test it out.

Share this post


Link to post
Share on other sites
19 hours ago, Neil Pate said:

The only other strange thing is that the client (or server, cannot remember which it is) does not support Data Change events, so you have to poll.

I made the Server a Client of itself, in order to get events when true Clients changed things.  A bit weird.

Share this post


Link to post
Share on other sites

Thanks everyone for the insights. After a lot of digging I too found it odd that the Data Change events weren't handled and the implementation(s) tend to go the binary route where DCOMs had to be configured. Yuck.

As this project will run on an intranet the benefits (or complexities for that matter) of the OPC UA securities are of no real benefit as it'll just be a data pipe in the end.

There's a client from  unified-automation.com/ that's free that was an easy install and immediately found the server on the Wago SPS for anyone that looking to do a bit of experimenting.

Share this post


Link to post
Share on other sites

I used the same client from United Automation to test out my OPC-UA server, it works nicely. How do you plan on integrating that with the rest of your application though?

Share this post


Link to post
Share on other sites

When you've got too many new variables it's nice to know something works as it should (the UA client)! At this point I will not integrate the OPC UA.

You did get me thinking though and I'd look into using the .NET OPC UA Client API for the simple fact the client worked so smoothly. The quality of the API is likely high too.  https://www.unified-automation.com/products/client-sdk/net-ua-client-sdk.html

-Peter

Share this post


Link to post
Share on other sites

For one of my projects that used OPC-UA I had probably 500 different nodes in the system. I did not really want to handle the data read using a case structure with 500 cases, so I went 100% down the route of name based lookup data structure implemented using Variant Attributes. I managed to extend this to a tree based system data viewer and configurable data logger, without ever actually using explicit node names (well, not perfectly but close enough).

For the most part I did not have to fight with OPC-UA, it just worked.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.