Error: Delayed Write Failed When Transferring Files to Linux Real-Time Controller

Updated Dec 2, 2022

Reported In

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Other

  • Linux Real-Time Controller

Issue Details

  • I am trying to transfer files to my Linux cRIO using FTP over File Explorer. However, I keep seeing a Windows error called Delayed Write Failed. What's causing this?
  • I have been able to exchange files with my NI Linux Real-Time Controller in the past, but now I see an error saying Windows was unable to save all data for the file. How can I fix this?
  • When I try to copy files from my Windows PC to my NI Linux Real-Time Controller, I see the error below. How can I troubleshoot this?
Delayed Write Failed
Windows was unable to save all the data for the file <XXXX>. The data has been lost.
This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.


Delayed Write File (1).jpeg
 

Solution

This error can be caused by a number of factors including storage, permission or connectivity issues. Work through the troubleshooting steps below to resolve it:
 

Troubleshooting Storage Issues

  • Verify that the NI Linux Real-Time Controller has enough storage space.
  1. Open NI Measurement and Automation Explorer (NI MAX) on your host PC.
  2. Expand the Remote Systems branch.
  3. Select your NI Linux Real-Time Controller.
  4. Under System Resources, ensure that there is ample Free Physical Memory and Primary Disk Free Space.
  5. If the controller is full or nearing capacity, delete unused files and try the file transfer again. Refer to How to Delete Files Deployed on Real-Time Controller for instructions.

cRIO in MAX.png
 

Troubleshooting Permission Issues

  • Ensure that the file and destination directory have sufficient permissions.
  1. Download PuTTY if it is not already installed on the host PC. Refer to [External] PuTTY download and then open PuTTY.
  2. In the Session pane, enter the controller's IP address (obtained from NI MAX) in the Host Name field. Set Port to 22 and ensure Connection type is SSH. Click Open.
  3. When the session starts, log in as an administrator. By default, the username is admin and the password is left blank.
  4. Allow read, write and execute permissions on the target directory by referring to the command syntax in [External] Manage file permissions on Unix-like systems.
    • For example, entering the command chmod a+rwx /home/lvuser/ adds read, write and execute permissions on the lvuser folder for everyone.
  5. Using the same syntax, allow read, write and execute permissions on the file that requires modifying/copying.
  6. Enter ls -lah in the terminal to verify that permissions have been successfully configured for the current directory's files and sub-directories.
  7. The image below shows an example of adding read, write and execute permissions to the lvuser folder. The ls -lah command reflects this by showing drwxrwxrwx for that folder.

cRIO chmod.PNG
 

Troubleshooting Connectivity Issues

  • Ensure that the controller can be successfully pinged from the host PC.
  1. From the Windows start menu, search for Command Prompt. Open the application.
  2. Enter ping <IP address> where <IP address> is the controller's IP address, which can be obtained from NI MAX.
  3. If the controller does not send a reply, refer to Destination Host Unreachable Error When Pinging Real-Time PXl Controller.
  • If the host PC is using a firewall, try disabling it before attempting the file transfer again.
  • If the controller is connected over a USB cable, ensure that there are no problems with the device driver.
  1. Open Device Manager.
  2. Expand the Network Interfaces section and search for USBLAN.
  3. If USBLAN has an exclamation point next to it, right-click on USBLAN and select Update Driver.
  • If the Real-Time Controller is connected over USB, try using a different USB cable.
    • Damaged or loose USB connections can result in the Delayed Write File error.