Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
6 ratings:
 4.5 out of 5     Rate this Document

Using FTP to Access and Use the External CompactFlash or USB Drive on a Real-Time Controller

Hardware: FieldPoint

Problem:
How do I FTP (File Transfer Protocol) data to and from the external CompactFlash card or external USB drive on a Real-Time target?

Solution:
National Instruments Real-Time (RT) systems refer to external CompactFlash (CF) drives by drive letter D: and external USB drives by drive letter U: . FTP to the drive letter of interest by using one of the following methods.

Measurement & Automation Explorer (MAX)
Open up MAX (Start»National Instruments»Measurement & Automation Explorer) and find your device under Remote Systems on the left. If you right click on your system name, you should choose the option called File Transfer as in the picture below.


After you choose this option, the File Transfer Wizard will pop up. This is your user interface between the remote system and your computer. The picture below shows what the File Transfer Wizard looks like.


The Current Remote and Local Directory are the filepaths of the current highlighted folder. If you want to transfer a file to your computer, then you would highlight the file under Current Remote Directory and choose the drive on your computer under Current Local Directory and hit the To Local button. You would hit the To Remote to do the opposite (change the directories and file paths first though). You can also add folders by hitting the button called New Folder to the right of the directory you want it to be in. The folders need to already exist if you want to programmatically write to them in LabVIEW. See Related Links for more details.

The following examples use drive letter D:, and illustrate how to FTP to the CF. Replace IP Address with the IP address or DNS name of the RT system.

Internet Explorer

  1. Launch Internet Explorer Start » Programs » Internet Explorer.
  2. In the Address bar, type ftp://IP Address/D:/
Windows Explorer
  1. Open a Windows Explorer Window Start » Run » explorer » OK.
  2. In the Address bar, type ftp://IP Address/D:/
Windows Command Line FTP Client
  1. Open a Command Window Start » Run » cmd » OK.
  2. Type ftp IP address
    • Enter the user name and password if prompted. By default, both values are blank.
  3. The connection is made to the primary drive, letter C:
  4. To access the CF card, type cd d: and press Enter.
  5. Type ? and press Enter to get a list of commands. Below is a list of common commands.
    • get filename downloads filename from the target.
    • put filename uploads filename to the target.
    • quit closes the session.
Note: The RT operating system supports names that follow the 8.3 (filename.ext) convention. File names must conform to this convention including the following restrictions.
  • Have no spaces.
  • Have at most eight characters before a period.
  • Have at most three characters after a period.

Caution: Do not remove or insert external storage media in hazardous locations while the system is powered (do not hot swap in hazlocs). Do not remove external storage media while the system is writing or reading from the media.

Related Links:
National Instruments FieldPoint Support Homepage
KnowledgeBase 4K1HPA20: What is the Correct File Path for LabVIEW Real-Time Targets?
KnowledgeBase 415A8ELH: What Does my USB Hard Drive or Flash Device not Work with my cRIO-901x or cFP-2220?


Attachments:





Report Date: 04/23/2002
Last Updated: 05/01/2009
Document ID: 2KM92E5F

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit