Jump to content

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!

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.

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?

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.

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.

  • Like 1
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.

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

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.

Link to post
Share on other sites
  • 1 month later...

Hey Neil - I am in the process of designing a 50 node (RT Linux) system with around 100 tags per node.  I was briefly thinking about using NSV's or RTI-DDS but now am thinking that OPC-UA would be a better solution for publishing tag values.  Do you have any performance metrics like tag updates /s for your implementation?.   I have seen some pretty nice OPC UA Client Viewers that function like the NI DSM but would prefer a native LV viewer.  Would you consider offering your OPC UA Viewer and Data logger as a toolkit?

Edited by viSci
Link to post
Share on other sites

Sorry if I have mislead you, looking back at my post I have to make a correction to my vocabulary. The whole system probably had about 10 nodes in total and the LabVIEW based controller had to implement several OPC-UA clients and servers (I think two each). In total the system had about 500 tags (not nodes, sorry!).

I tested things at a maximum rate of about 1 "update"/s where an "update" was changing all the tags of a particular subsystem. Performance was never an issue at all of this portion of the application, I cannot say I ever saw the CPU particularly taxed. What did cause performance issues was trying to update my tree control view and name based logging. What I gained in elegance in the code I sacrificed in performance. Also, if I never have to write another recursive tree updating routine based on hierarchical tag names I will be quite happy.

I am not at liberty to share anything as I did it as consultancy for another company, sorry.

In the end OPC-UA worked fine, and I would certainly consider it again. I will never use NSVs in a project; I just have too much distrust of them. In fairness though it has been nearly 7 years since I was scarred by them...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By krzych07
      down vote
      favorite   I have OPC server on CodeSys. I am trying to read variables using LabView.
      I have tried two options:
      using DataBinding to OPC Variables in controls using DataSocket Open, Read, Write, Close VI LabView returns no error. When I use data binding control it is green and the message is "Active: Connected to OPC server".

      Unfortunately when I force variables in CodeSys i see no changes in LabView.
    • By dterry
      Hello all,
      I recently was presented with the task of integrating a Mitsubishi PLC into our systems. After a good deal of googling, I think the best (maybe only) way to get the data out is going to be via OPC, thanks to their proprietary Melsoft protocol. If anyone else knows a better way, feel free to stop me here.
      Now, we are currently expanding our data generating capabilities (hence the PLC), and I have been thinking about rearchitecting the way we collect data from all over our facility to be more flexible.  Since I may be required to use OPC anyways, I was considering using an OPC server to aggregate all of the facility data, and then redistribute to control rooms, historical logging, etc.  To do this, we would need to integrate our cRIOs and operator PCs into the OPC environment as well.
      I don’t see OPC mentioned very often (in fact it returns 0 results on LAVAG), and a lot of the stuff I see these days seems to be more “roll your own” or lower level (raw TCP/UDP, 0MQ, Network Streams, Transport.lvlib etc.) rather than a monolithic abstracting bridge like OPC. Unfortunately, I won’t have time to roll my own in the near future, but LVRT supports supports OPC UA, so I could potentially integrate the cRIOs fairly easily.  Unfortunately, I think I would have to use LabVIEW DSC (or datasockets...) to integrate the PCs.
      I would be very grateful if anyone has the experience to comment on the following or anything else related to using OPC.
      What are viable update rates for OPC tags?  I will need at the very (very) least 250 ms update rates.  Is OPC typically low latency (time from data generated to to client received)? Does anyone have a recommendation for a product (NI OPC, Kepware, etc.)? Is OPC still popular, or are there other options for data aggregation that would be better suited to a new application? What are the options for logging and alarming with OPC? What are the options for talking to OPC from LabVIEW? How robust are the OPC connections in regards to reconnecting if a wireless connection is temporarily lost? Thanks in advance!
    • By ASalcedo
      Hello to all.
      First I explain my environment and then I will ask the question.
      PC 1 (development PC): intel i5, windows10 64bits, 8GB Ram, Labview 2015 SP1 (32 bits), Vision Adquisition Software 2015, Module Vision 2015, DSC 2015, ni OPC Server.
      PC 2 (deployment PC) : intel celeron 1.99 GHz, windows 7 64bits 8GB Ram, Labview 2015 SP1 (32 bits), VIsion Adquisition Software 2015, Module Vision 2015, DSC 2015, ni OPC Server, Run Time Engine 2015, VIsion Run Time 2015.
      PC 3 (deployment PC) intel Atom CPU N2600 1.40GHz, windows 7 64bits, 4GB Ram, Labview 2015 SP1 (32 bits), VIsion Adquisition Software 2015, Module VIsion 2015, DSC 2015, ni OPC Server, Run Time Engine 2015, VIsion Run Time 2015.
      I use the next in my aplication:
      2 cameras GigE Lan connected to PC. A PLC connected RS232 through ni OPC server and about 15 shared variables.
      In development environment my application works well. In PC 2 a executable of my application works well.
      But the problem is that the same executable works bad in PC 3. Front Panel is slow and displays of image cameras don't refresh the image well. So all my application is slow in PC 3.
      What can it be? I don't think that it could be the specification of PC 3 but I don't know... Does anyone fix something similar?
      Any help will be appreciate it.
      Thanks a lot.
    • By pato7
      Hello,
      I  have a question regarding creating reference/Variable nodes in the OPC UA Data structure. For example, we have two items in a big data structure tree having the same property, Is it possible to create this reference property while building the data structure? And can it be represented in the data tree at both items? Should I use local Variables for this task? and how?
      In short, Iam asking if its possible to have same property represented two times in the Data tree and when we change it's value in one place, it automatically changes in the other place.
      Any advice would be highly appreciated. Thank you.
      Best Regards.
    • By pato7
      Hello,
      I want to ask if its possible through labview to connect two OPC UA servers. if yes, is it possible to do it on the same PC or the two servers should be on separate windows?
      Thank you.
      Best Regards.
×
×
  • Create New...

Important Information

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