Error 1181 When Using DataSocket To Connect To OPC Server

Updated Jun 20, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am using DataSocket VIs to communicate to an OPC Server installed on a remote server.
However, DataSocket Open VI returns the following error:

Error 1181 occurred at DataSocket Open at xxx.vi
Possible reason(s):
LabVIEW:  Protocol not recognized by LabVIEW.

 

Solution

This error is typically directly related to either the software not having support for the protocol, or a possible privilege issue with the protocol.

The error is expected in LabVIEW 64-bit since OPC communication using DataSocket is supported only in LabVIEW 32-bit version. 
  • Check the bitness of the LabVIEW you are currently using 
  • Download the 32-bit version of LabVIEW if you currently are using 64-bit
If you are getting this error also using LabVIEW 32-bit, you should check privileges to read from the OPC Server you are trying to connect to.

If you are trying to use the DataSocket VI's on a Real-Time Operating system and are receiving this error, you should note that if trying to communicate with an OPC DA server that this won't work because OPC DA works off the DCOM Windows protocol. This is only supported with Windows based OS. Instead, you should check if your OPC Server could work off of the OPC UA protocol which would work with real-time systems. 




 

Additional Information

  • The error is expected in LabVIEW 64-bit 2009 or later, since OPC foundation does not provide 64 bit binaries of the OPC core redistributables for OPC version 2.0. 
  • You can have both the 32-bit and 64-bit version of LabVIEW on a single machine. Be careful in selecting the correct bit version to use.