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 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.
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”.
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.)
Open a connection to the FTP server.
Enter your username and password here or hit <enter> twice if these security settings have not been applied.
View a list of commands
Change to the desired directory.
View the files present.
get index.htm c:/index.htm
Copy the file.
Change directories back to the root (c:/).
Change directories to the external compact flash.
put c:/index.htm index.htm
Copy the file from the FTP client machine to the target
Verify the newly copied file
Change directories back to the internal compact flash or hard drive.