User`s guide

Using xpctarget.ftp Objects
7-5
Using xpctarget.ftp Objects
The xpctarget.ftp object enables you to work with any file on the target PC,
including the data file that you generate from an xPC Target scope object of
type
file. The xpctarget.ftp object has methods that allow you to use
cd to change directories
dir to list the contents of the current directory
get (ftp) to retrieve a file from the target PC to the host PC
mkdir to make a directory
put to place a file from the host PC to the target PC
pwd to get the current working directory path
rmdir to remove a directory
The procedures in this section assume that the target PC has a signal data file
created by an xPC Target scope of type
file. This file has the pathname
C:\data.dat. See “Simulink Model” in Chapter 3 of the getting started
documentation and “Signal Tracing with xPC Target Scope Blocks” in Chapter
3 of this document for additional details.
This section includes the following topics:
“Accessing Files on a Specific Target PC” on page 7-5
“Listing the Contents of the Target PC Directory” on page 7-6
“Retrieving a File from the Target PC to the Host PC” on page 7-7
“Copying a File from the Host PC to the Target PC” on page 7-8
xPC Target also provides methods that allow you to perform file system-type
manipulations, such as opening and reading files. For a complete list of these
methods, see “Using xpctarget.fs Objects” on page 7-9.
Accessing Files on a Specific Target PC
You can access specific target PC files from the host PC for the xpctarget.ftp
object.
Use the
xpctarget.ftp creator function. If your system has multiple targets,
you can access specific target PC files from the host PC for the
xpctarget.ftp
object.