This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
The files stored on a target PC are in the xPC Target file format. To access these files, use the xPC Target commands. The easiest way to get data from the target PC is to read it from the target PC. The xPC Target documentation discusses this.
There are two ways that you can access the data:
- Retrieving the Contents of a File from the Target PC to the Host PC
- Retrieving a File from the Target PC to the Host PC
Retrieving the Contents of a File from the Target PC to the Host PC
You can retrieve the contents of a file from the target PC to the host PC, then convert the data.
The xPC Target documentation describes this procedure. If you have installed the help documentation for your licensed product, you can locally access the help page associated with this procedure by typing the following at the MATLAB prompt:
web([docroot,'/toolbox/xpc/ch_fs11.html'])
This returns an article titled "Retrieving the Contents of a File from the Target PC to the Host PC". In summary, these steps are:
fsys = xpctarget.fs
h = fsys.fopen('testdata.dat')
data = fsys.fread(h);
fsys.fclose(h);
new_data = readxpcfile(data);
Retrieving a File from the Target PC to the Host PC
You can retrieve a file from the target PC to the host PC, then convert the contents of that file.
The xPC Target documentation describes this procedure. If you have installed the help documentation for your licensed product, you can locally access the help page associated with this procedure by typing the following at the MATLAB prompt:
web([docroot,'/toolbox/xpc/ch_fs7.html#35548'])
This returns an article titled "Retrieving the Contents of a File from the Target PC to the Host PC". After you retrieve the
file, use steps like the following to convert the file format.
h = fopen('testdata.dat');
data = fread(h);
data = uint8(data');
new_data = readxpcfile(data);
Best Answer