LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC Tags Open/Read: OPC UA Toolkit vs Datasocket

Hello all,
I am trying to migrate my old-style Datasocket readings into the OPC UA Toolkit. My applications typically open connections to 30.000+ tags. In the Datasocket world I opened the tag path to create a reference and then in the While loop I read the value of the reference without resolving the path at each iteration. Using the OPC UA Toolkit I cannot find the Open Tag (node) function to create such reference and invoke it instead of rebuilding it at every iteration. Multiple-Read in the OPC UA toolkit does not seem to have a subVi that only makes the Open Node connection.
Thank you
Christophe

0 Kudos
Message 1 of 4
(769 Views)

Hi!

 

Whenever you access a node in an OPC UA server, the entire NodeID is always sent to the server. This is not LV-specific, it is OPC UA specific. So, it makes less to no sense to create a reference as you are looking for.

 

Anyway, reading 50'000 values every 100ms will overload server and/or client, and even if not, generate huge CPU load. Reading is for sporadic data access, but not this...

 

Use a subscription instead where you request the OPC UA server to inform you about any changes in data. Only one of your 5000 values changes within 1 second? You'll get informed about that one node ID, the new value, a timestamp and a quality information. Super low CPU load on client side.

 

See OPC UA Demo.lvlib::Data Access Client.vi how it's done.

 

0 Kudos
Message 2 of 4
(728 Views)

Hello and thank you for your answer,

In all our machines data are being prepared by the PLC during the cycle in a temporary DB then pushed to another DB at once for my Client to fetch. I am not reading all 30.000+ data every ms but only when the trigger sent by the PLC advises me that data are ready and this occurs every 1min roughly.

Based on my tests reading all 30.000+ data takes 260ms using a DA refnum whereas it takes 18.000ms using the Multiple Read.vi (OPC UA) i.e. 70 times more than with DA!

If you think of a solution that does not require reprogramming all my PLC I will be super glad to test it because right now I am stuck ☹

Thanks

Christophe

0 Kudos
Message 3 of 4
(642 Views)

Hello Christoph,

my problem was not the same, but in my case the PLC timer was not transferred in adequate time. As with you, retrieving the data as an array multiple read didn't help, only subscribing to all tags helped...

 

We have built a framework that enables a similar integration as before.

- Supscripen

- own loop to buffer the changed values in an FGV as a variant with a parallel TAG array for the TAG value assignment

- In the old Datasocket SubVIs, get the data from the FGV via the TAG

 

I hope you also found a solution. Good luck with the solution

 

Olaf

0 Kudos
Message 4 of 4
(377 Views)