Errors Transferring Massive Amounts of Files from LabVIEW Real-Time Targets

Updated Jul 20, 2018

Reported In

Hardware

  • PXI Controller
  • CompactRIO Controller
  • CompactRIO Single-Board Controller

Software

  • LabVIEW Real-Time Module
  • LabVIEW Full
  • LabVIEW FPGA Module

Issue Details

I created an application with my Real-Time system where I constantly generate files that are stored in its memory. I got a massive amount of files on the Real-Time target memory and I when I try to transfer them to one computer using the FTP server option or to delete them, I can only do that one by one. Thus, it will be a really time-consuming task to move all of them. Why is this happening? Is there a way to perform this task faster?

Solution

To overcome this obstacle you can pull out the files programatically using LabVIEW. There are two different options to perform this:
  1. Using the FTP basic functions of LabVIEW you can draw out the files from the FPGA target and put them on an FTP server. The FTP Directory Listing function can be used to determine all the paths of the files that have to be extracted. However, for this option, it will be required to have access to an existing to FTP server, to use it as a target when the functions are executed. Additionally, if it is required to store those files in a predetermined computer, extra work will have to be done to move the files from the FTP server to the computer.
  2. Using the WebDAV LabVIEW functions the operation can be performed without requiring an FTP server. As in the FTP option, you can use a function called Directory Listing to list all the files contained on the specified folder on the Real-Time target memory. The following snippet shows briefly the procedure, also, it is shown the corresponding block diagram as a reference to know how the file paths should be.

Block Diagram



Front Panel
 

If the Directory Listing.vi does not work correctly, the number of files on the Directory maybe already exceeded the maximum amount of files supported by this function. In this way, it will be required to generate the list of the file paths needed using other method, in this case creating a text file containing them. Follow this steps to create this file:
  1. Acces the folder path of interest using the command prompt on your computer.
  2. Enter dir/s/b * > Textfile.txt.
  3. The Textfile.txt will contain all file paths of this directory.
Creating this file, the task that would be performed by the Directory Listing.vi is already done. Therefore, the rest of the process only involves extracting these file paths from the .txt file to manage them programmatically as is shown in the following snippet.

Additional Information

Why can I only transfer or delete files one by one?

It has been seen that when the memory of the Real-Time target is close to getting full, the files manipulation using the FTP server alternative can become slow, unstable, burdensome or restrictive. This is due to the FTP protocol limitations.

WAS THIS ARTICLE HELPFUL?

Not Helpful