From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview DataSocket and OPC UA?

Hello,

Long time user of Labview 2012 + DataSocket to Access OPC server data, I am facing this new issue:

  • I need to connect to Siemens TIA Portal series (for instance the 1500 serie that has an embedded OPC UA server) using symbolic addressing
  • On the NI website I read that DataSocket are not compatible with OPC 3.x. Is OPC UA synonym with OPC 3.x?
  • I also see that there is a Labview OPC UA Toolkit 2017, does it have DataSocket that are able to communicate to OPC UA servers?

 Sorry things are a little bit confusing in my mind, hopefully someone might clarify it. I would be sad to abandon the DataSocket path that is working well for years now and for all other kind of PLC connections that I had to face.

Thank you very much

Christophe

0 Kudos
Message 1 of 7
(4,441 Views)

Hi Christophe,

If I understand you correctly, you have LabVIEW 2012 and would like to access OPC server data from a Siemens TIA Portal using DataSockets.

 

I assume that OPC 3.x refers to Classic OPC. To clarify, OPC UA is not synonym to Classic OPC. The OPC UA is a newer protocol with cross-platform compatibilities and improved security, while Classic OPC is limited to only working between systems running on Windows OS. I found a White paper explaining the differences and also compatibilites between the two protocols. I attach the link here. However, to set up a communication link that bridge Classic OPC and OPC UA tends to be rather complex and is not recommended. 

 

My recommendation is that you switch to using the OPC UA protocol altogether and use the LabVIEW OPC UA Toolkit 2017. The toolkit requires LabVIEW 2017 or later, so I suggest that you update from LabVIEW 2012. Just keep in mind that when directly using a VI written in an older LabVIEW version minor code revisions may need to be done. The LabVIEW OPC UA Toolkit 2017 do not use any DataSockets, instead the toolkit includes a set of subVIs that are intuitive and easy-to-use. 

 

I understand that abandoning an already working project is hard, but I think the switch to LabVIEW OPC UA Toolkit 2017 is worth it in the long run. Newer PLCs on the market are switching from Classic OPC to OPC UA protocols, so the same compatibility issue will probably occur again if you keep working with DataSockets.

 

Here are some useful links to read more about the topic:

Introduction to OPC

 

Why OPC UA Matters

OPC with LabVIEW Software Options

 

 

 

If you have any further concerns or questions, I will gladly assist you.

Best regards,

Marcus

0 Kudos
Message 2 of 7
(4,393 Views)

Hello Marcus,

Thank you for your answer that partially answers my original question. I understand that your recommendation is to use the UA Toolkit 2017 but my question was if the DataSocket client that I use in Labview 2012 does or does not allow access to a OPC UA Server. OPC UA dates back from 2006 and my Labview 2012 is obviously way newer than 2006 hence I was wondering if the DataSocket engine of Labview did somehow adapt to the evolution of OPC.

Thank you again

Christophe

0 Kudos
Message 3 of 7
(4,370 Views)

According to the documentation, Datasocket supports the following protocols: psp, dtsp, opc, ftp, file, http.

Opc means classic OPC. As already pointed out by MBengths, OPC UA is a different, new protocol.

So the answer is no.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 7
(4,366 Views)

How does one make a connection to an older DataSocket server with the newer OPC UA client tools? UA is supposed to absorb classic OPC sources, but I'm having trouble getting this to work.

0 Kudos
Message 5 of 7
(3,927 Views)

I believe that there are software products called "Tunnellers" that will let you bridge between OPC Classic and OPC UA.

Here is one of them

https://www.matrikonopc.com/opc-ua/products/opc-ua-tunneller.aspx

 

Matrikon has a free 30 day trial period, so no harm in downloading and trying it out.

 

But as others mentioned, it is better to make the switch to OPC UA completely. 

0 Kudos
Message 6 of 7
(3,899 Views)

Sure, one can switch to using only the OPC-UA tools in a labview application. The question is, how best then to connect to older OPC DA and DataSocket sources, from the OPC-UA tools? We're not seeing easy means of this through the OPC-UA intefaces in labview.

 

Matrikon's tunneler is an added expense, and added system component... and is sometimes a quick solution to connect to OPC servers, I agree.

0 Kudos
Message 7 of 7
(3,892 Views)