Can't Establish TCP/IP Connection from CompactRIO LabVIEW Client to Windows Python Server

Updated Mar 28, 2023

Reported In

Hardware

  • cRIO-9035

Software

  • LabVIEW

Operating System

  • Windows
  • NI Linux Real-Time

Programming Language

  • Python

Issue Details

I'm following this example for Python/LabVIEW TCP communication. I run the LVClient2011 VI on the CompactRIO (client) and am running the SimpleServer Python script on my Windows computer (server). I am unable to establish a connection, and receive Error 63 at TCP Open Connection:
 

Can someone help me write this program?

Solution

To edit the example for usage between a Windows computer and a CompactRIO target, make the following changes:
  • In the Python server script (on the Windows computer), change the 'localhost' argument in server.bind to socket.gethostname(). This allows clients to access the server. 
  • In the cRIO LabVIEW program, remove all the case structures and the while loop. Change the address input of the TCP Open Connection VI to the IP address of your computer/server:

You can consult and modify the attached example for your needs.

Additional Information

This example assumes you have proper connectivity with your CompactRIO on your PC, and that you can add the cRIO to a LabVIEW project.