User`s guide
Using xpctarget.ftp Objects
Using xpctar get.ftp Objects
In this section...
“Overview” on page 9-5
“Accessing Files on a Specific Target PC ” on page 9-6
“Listing the Contents of the Target PC Folder” on page 9-7
“Retrieving a File from the Target PC to the Host PC” on page 9-7
“Copying a File from the Host PC to the Target PC” on page 9-8
Overview
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. You e n te r target object methods in the MATLAB w indow on the
host PC or use scripts. The
xpctarget.ftp object has methods that allow
you to use
•
cd to change directories
•
dir to list the contents of the current folder
•
get (ftp) to retrieve a file from the target PC to the host PC
•
mkdir to make a folder
•
put toplaceafilefromthehostPCtothetargetPC
•
pwd to get the current working folder path
•
rmdir to remove a folder
The procedures in this section assume that the target PC has a signal data file
created by an xPC Target file scope. This file has the pathname
C:\data.dat.
See “Simulink Model” in the xPC Target Getting Started Guide and “Signal
Tracing with xPC Target Scope Blocks” on page 3-49 in this documentation
for additional details.
The xPC Target software also provides methods that allow you to perform file
system-type operations, such as opening and reading files. For a complete list
of these methods, see “Using xpctarget.fs Objects” on page 9-9.
9-5