Solution
There are several reasons that can cause a LabVIEW executable using DataSocket communication to not work correctly:
- NI DataSocket needs to be installed on the system.
Note: The LabVIEW 2017 Run Time Engine (RTE) installer was the last version to include DataSocket.
To confirm NI DataSocket is installed, check the following:
- Search the Start menu for DataSocket.
- Open NI Package Manager and search the Installed packages for DataSocket,
If you need to install DataSocket on a computer, you can:
- If your LabVIEW application programmatically opens and closes the DataSocket server using DataSocket Server Control VI, it needs to be explicitly included in the built application:
- Navigate to the following location and add the VI to the LabVIEW Project: <LabVIEW 20xx>\vi.lib\platform\dataskt.llb\DataSocket Server Control.vi
- Add the VI to the "Always Include" section of the source files category in the application Build Specification Properties, or the executable will not programmatically open the DataSocket Server.
- If you want your application to close the DataSocket Server programmatically, duplicate DataSocket Server Control VI and change the Operation input to close.
- Incorrect Windows DCOM settings can prevent an executable from successfully opening a DataSocket connection. Many DCOM connection problems can be overcome by disabling DCOM authentication for your application by adding the following line to the executable's INI file:
ole.AuthnLevel = 1
Note: The executable's INI file should be located in the same directory as the executable and should have the same name (i.e. Application name.ini).