FTP Options with LabVIEW Real-Time


The LabVIEW Real-Time Engine that runs on the CompactRIO, PXI, FieldPoint, and Compact FieldPoint LabVIEW Real-Time controllers has a File Transfer Protocol (FTP) server. You can access the FTP server using any standard FTP utility for transferring files to and from the hard drive or compact flash. The following sections demonstrate how to download files from and upload files to your LabVIEW Real-Time target using various FTP clients.

Note: For LabVIEW Real-Time 6.1 and earlier, the file name must be in the DOS 8.3 format. Using this format, names cannot be longer than 8 characters. For example, the regular LabVIEW file path would be c:\Progra~1\nation~1\LabVIEW. You also must provide the correct password when opening a connection to the PXI controller if the configuration is locked in MAX or FieldPoint Explorer.


LabVIEW Real-Time Graphical File Transfer Utility

LabVIEW Real-Time Module versions 7.0 and later include a File Transfer Utility that can be used to access your RT Target. This method helps you avoid the caching problem encountered when using web browsers. On Windows computers, you can find this utility in the Measurement and Automation Explorer (MAX). To open the utility, right-click on the desired RT Target under the Remote Systems list and choose File Transfer. Refer to related link below.

Third Party File Transfer Utility

You could also use an third party FTP client utility. An example is FileZilla which is open source. Refer to the related link listed below.

See Also:


There are also ways in LabVIEW to programmatically access the FTP server of a LabVIEW Real-Time target.

The DataSocket Read function has the ability to read raw text, tabbed text, and .wav files from a FTP server. For more information on this, please refer to LabVIEW help manuals listed in the links below.
The LabVIEW Internet Developers Toolkit gives you the ability to send files or raw data to an FTP server as well as sending emails and adding security to your web-based applications. The example program linked below which is titled “Sending and Retrieving Files Programmatically through FTP” shows how to use the FTP VIs included in the toolkit. You can also perform windows system FTP transfers with system exec VI. Refer to the related link “Using the Windows system FTP utility from LabVIEW with the System Exec VI”.

See Also:
LabVIEW Help

DOS Command Prompt

You can run a native FTP client from the DOS command prompt on a Windows PC with the following commands:
To open the FTP client, navigate to start » run and type command. The following sequence illustrates how you can use the commands to access the FTP server of your RT target.

(Note: "w.x.y.z" represents the IP address of the RT target in this document.)

ftpOpen a connection to the FTP server.
open w.x.y.z
(username)Enter your username and password here or hit <enter> twice if these security settings have not been applied.
helpView a list of commands
cd ni-rt/system/wwwChange to the desired directory.
dirView the files present.
get index.htm c:/index.htmCopy the file.
cd /Change directories back to the root (c:/).
cd d:Change directories to the external compact flash.
put c:/index.htm index.htmCopy the file from the FTP client machine to the target
dirVerify the newly copied file
cd c:Change directories back to the internal compact flash or hard drive.
quitDisconnect from the FTP server.

Web Browsers

Although it is possible to use most web broswers to access FTP sites, it is not recommend since it they often do file caching.

If w.x.y.z is the IP address of your RT target,

  • To access the hard drive or internal compact flash, open Internet Explorer and type the following in the address field


  • If a username and password are required, then use the following format:


  • To access the external compact flash, open Internet Explorer and type the following in the address field:


  • To enter a directory, double-click on its icon.
  • Right-click on a file or folder and choose cut, copy, paste or delete to perform those actions.


Was this information helpful?