Transferring Files from a FieldPoint FP-20xx through an FTP Server
Overview
You can use the FP FTP VI to transfer files to and from the FP-20xx Flash memory using the FTP server on the FP-20xx. The FP FTP VI also provides remote file deletion and directory creation functionality. You must have the LabVIEW Internet Developers Toolkit installed to run the FP FTP VI. Use the FP FTP VI to perform the following tasks:
- Transfer a file to the FP-20xx
- Retrieve a file from the FP-20xx
- Delete a file from the FP-20xx
- Create a new directory on the FP-20xx
Table of Contents
Accessing Files Using the FTP Addressing Protocol
You can use a Web browser to access the files using the FTP addressing protocol as shown in the following figure.

Transferring a File to the FP-20xx
To transfer a file to the FTP server on the FP-20xx using the FP FTP VI, follow these steps and refer to this figure:
1. Launch the FP FTP VI.
2. In the FP-20xx IP Address field, enter the IP address of the FP-20xx module.

3. If the FP-20xx module has a network password, enter the user name in the User field. Enter the network password in the Password field. If the FP-20xx does not have a network password, you can leave the User and Password fields blank. For more information about security for the FP-20xx, refer to the FieldPoint Explorer Online Help.
4. Select Put File on FP-20xx from the Action menu.
5. In the Filepath on FTP Server field, enter the location on the FTP server where you want to save the uploaded file.
6. In the Local Path field, enter the path of the file you want to upload to the FTP server.
7. If you are transferring a binary file, check the Binary checkbox. If the Binary checkbox is not checked, the VI assumes that you are transferring an ASCII file.
8. If the data connection you are using is passive, check the Passive checkbox. If the Passive checkbox is not checked, the VI assumes that the data connection is active.
9. Run the VI. The Reply field indicates if an error occurs.
Retrieving a File from the FP-20xx
To retrieve a file from the FTP server on the FP-20xx using the FP FTP VI, follow these steps:
1. Launch the FP FTP VI.
2. In the FP-20xx IP Address field, enter the IP address of the FP-20xx module.
3. If the FP-20xx module has a network password, enter the user name in the User field. Enter the network password in the Password field. If the FP-20xx does not have a network password, you can leave the User and Password fields blank. For more information about security for the FP-20xx, refer to the FieldPoint Explorer Online Help.
4. Select Get File From FP-20xx from the Action menu.

5. In the Filepath on FTP Server field, enter the path of the file that you want to download.
6. In the Local Path field, enter the location to which you want the file to download.
7. If you are transferring a binary file, check the Binary checkbox. If the Binary checkbox is not checked, the VI assumes that you are transferring an ASCII file.
8. If the data connection you are using is passive, check the Passive checkbox. If the Passive checkbox is not checked, the VI assumes that the data connection is active.
9. Run the VI. The Reply field indicates if an error occurs.
Deleting a File from the FP-20xx
To delete a file from the FTP server on the FP-20xx using the FP FTP VI, follow these steps:
1. Launch the FP FTP VI.
2. In the FP-20xx IP Address field, enter the IP address of the FP-20xx module.
3. If the FP-20xx module has a network password, enter the user name in the User field. Enter the network password in the Password field. If the FP-20xx does not have a network password, you can leave the User and Password fields blank. For more information about security for the FP-20xx, refer to the FieldPoint Explorer Online Help.
4. Select Delete Directory/File From FP-20xx from the Action menu.

5. In the Filepath on FTP Server field, enter the file you want to delete. The other FTP parameters are ignored.
6. If you are deleting a binary file, check the Binary checkbox. If the Binary checkbox is not checked, the VI assumes that you are deleting an ASCII file.
7. If the data connection you are using is passive, check the Passive checkbox. If the Passive checkbox is not checked, the VI assumes that the data connection is active.
8. Run the VI. The Reply field indicates if an error occurs.
Creating a New Directory on the FTP Server
To create a new directory on the FTP server using the FP FTP VI, follow these steps:
1. Launch the FP FTP VI.
2. In the FP-20xx IP Address field, enter the IP address of the FP-20xx module.
3. If the FP-20xx module has a network password, enter the user name in the User field. Enter the network password in the Password field. If the FP-20xx does not have a network password, you can leave the User and Password fields blank. For more information about security for the FP-20xx, refer to the FieldPoint Explorer Online Help.
4. Select Create New Directory on FP-20xx from the Action menu.

5. In the New Directory Path field, enter the name and location of the new directory you want to create on the FP-20xx.
6. Run the VI. The Reply field indicates if an error occurs.
Customizing the FP FTP VI
To add another FTP control to the FTP Browser, follow these steps:
1. Add a new item to the Action ring control by right-clicking on the Action field on the front panel. Select Add Item After. Enter the name of the item you want to add.
2. Add a new case to the Case Structure in the block diagram by right-clicking on the block diagram and selecting Case from the Functions palette.
3. In the new case, add any of the low-level FTP VIs available in the LabVIEW Internet palette. Refer to the LabVIEW Context Help for each FTP VI for more details about the parameters you will need to provide.
Reader Comments | Submit a comment »
FP FTP.vi
I tried downloading the FT FTP.vi. It
searches for several sub VI's such as FTP
Logon that it can't find. I had just
upgraded to LV 8.0
- Bill Meier, Kop-Flex, Inc.. bmeier@emerson-ept.com - Mar 15, 2006
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
