User`s guide

Using xpctarget.ftp Objects
7-7
Note You must use the dir(f) syntax to list the contents of the directory. To
get the results in an M-by-1 structure, use a syntax like
y=dir(f). See the dir
method reference for further details.
For example, to list the contents of the C:\ drive,
1 In the MATLAB window, type the following to assign the xpctarget.ftp
object to a variable:
f=xpctarget.ftp;
2 Type
f.pwd
This gets the current directory. You get a result like the following:
ans =
C:\
3 Type the following to list the contents of this directory:
dir(f)
Retrieving a File from the Target PC to the Host PC
You can retrieve a copy of a data file from the target PC by using xPC Target
methods on the host PC for the
xpctarget.ftp object.
Use the method syntax to run an
xpctarget.ftp object method. The syntax
method_name(ftp_object, argument_list) can be replaced with
ftp_object.method_name(argument_list)
For example, to retrieve a file named data.dat from the target PC C:\ drive
(default),
1 If you have not already done so, in the MATLAB window, type the following
to assign the
xpctarget.ftp object to a variable.
f=xpctarget.ftp;