Error 42 LabVIEW DataSocket Open VI Connection to Non-NI OPC Server

Updated Dec 18, 2023

Reported In

Software

  • LabVIEW

Other

  • non-NI OPC Server
  • LabVIEW DataSockets

Issue Details

I am trying to connect to a non-NI OPC Server using the DataSocket Open VI, but I get Error 42 every time.  I know the OPC Server is functional as I am able to access it with a test client that came with the server.  When I have NI OPC Quick Client open and connected to the 3rd party OPC Server, DataSocket Open.vi goes through successfully and there are no errors thrown.

Solution

The DataSocket Open VI can connect only if the third-party OPC Server matches the specification exactly as DataSocket is expecting it.  Otherwise, LabVIEW DataSocket will not be able to find the published tags.

Try the following troubleshooting step and alternative methods of connecting to your 3rd party OPC Server: