Error 54 in TCP Connection.vi in LabVIEW

Updated Dec 27, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-FieldPoint
  • NI CompactRIO

Issue Details

  • I have a LabVIEW project that communicates with different devices over TCP/IP and Modbus TCP, the program is working but sometimes, randomly I get error 54.
  • I am trying to use the FTP VIs to transfer files to and from my target to a host computer. I tested the application from my host machine, and everything works fine; however, when I run an FTP VI then I receive error 54 in TCP Open Connection .vi. How do I correct this problem?
 
Error 54 ocurred at TCP Open Connection in FTP Open Session.vi->FTP Put Multiple Files and Buffers.vi->FTP Put File.vi-> FTP Generated Data.vi

Possible reason(s)>

The network address is ill-formed. Make sure the address is in a valid format. For TCP/IP, the address can be either a machine name or an IP address in the form xxx.xxx.xxx.xxx. If this error occurs when specifying a machine name, make sure the machine name is valid. Try to ping the machine name. Check that you have a DNS server properly configured.    
       
 
                      

Solution

This error points to an issue with a network connection, it can be caused by any sort of connection interruption. If you expect a faulty network connection, you should handle the error and attempt to reconnect until the connection can be re-established.
 
  • Make sure that a Domain Name System (DNS) address has been defined for the Ethernet port. The FTP VIs are created using the TCP LabVIEW functions to implement the communication; therefore, a connection to a DNS server must be established before a FTP operation can take place. 
  • The DNS address should only be necessary if a machine name is being used instead of the actual IP address in the URL. For example, if your URL is ftp://fieldpoint/data instead of ftp://192.168.0.1/data, then a DNS address is needed.
    • The DNS address can be configured by accessing the network settings/properties dialog for your RT device.
    • In PXI RT, this setting can be found by accessing the TCP/IP properties page for the network interface adapter of the controller. 
    • In FieldPoint and CompactRIO, the DNS address can be specified while configuring the device from the Remote System Explorer.