User`s guide

7 Working with Target PC Files and File Systems
7-10
“Getting Information about a File on the Target PC” on page 7-15
“Getting Information about a Disk on the Target PC” on page 7-15
xPC Target also provides methods that allow you to perform file transfer
operations, such as putting files on and getting files from a target PC. For a
description of these methods, see “Using xpctarget.ftp Objects” on page 7-5.
Accessing File Systems from a Specific Target PC
You can access specific target PC files from the host PC for the xpctarget.fs
object.
Use the
xpctarget.fs creator function. If your system has multiple targets,
you can access specific target PC files from the host PC for the
xpctarget.fs
object.
For example, to list the name of the current directory of a target PC through a
TCP/IP connection,
1 In the MATLAB window, type a command like the following to assign the
xpctarget.fs object to a variable.
fsys=xpctarget.fs('TCPIP','192.168.0.1','22222');
2 Type
fsys.dir;
Alternatively, you can use the xpctarget.xpc constructor to first construct a
target object, then use that target object as an argument to
xpctarget.fs.
1 In the MATLAB window, type a command like the following to assign the
xpctarget.xpc object to a variable.
tg1=xpctarget.xpc('TCPIP','192.168.0.1','22222');
2 Type the following command to assign the xpctarget.fs object to the tg1
target object variable.
fs=xpctarget.fs(tg1);
Alternatively, if you want to work with the file system of the default target PC,
you can use the
xpctarget.fs constructor without arguments.