User`s guide
2 Targets and Scopes in the MATLAB
®
Interface
6 Toenablethefilescopetocreatemultiplelogfileswiththesamename
pattern, type
sc.Filename='file_<%>.dat';
This sequence directs the software to create up to nine log files, file_1.dat
to file_9.dat onthetargetPCfilesystem.
7 To add signal 4 to the file scope, type
sc.addsignal(4);
8 To s tart the scope, type
+sc
9 To start the target application, type
+tg
The software creates a log file named file_1.dat and w rites data to
that file. When the siz e of
file_1.dat reaches 40 96 bytes (value of
MaxWriteFileSize), the software closes the file and creates file_2.dat
for writing until its size reaches 4096 bytes. The software repeats this
sequence until it fills the last log file,
file_9.dat. If the target application
continues to run and collect data after
file_9.dat, the so ftw are reopens
file_1.dat and continues to log data, overwriting the existing contents. It
cycles through the other log files sequentially. If you do not retrieve the
data from existing files before they a re overw ritten, the data is lost.
If you want to acquire si gnal data into a single file, see “Acquiring Signal Data
with Scopes of Type File” on page 2-11.
Advanced Data Acquisition Topics
The moment that an xPC Target scope begins to acquire data is user
configurable. You can have xPC Target scopes acquire data right away, or
define triggers for scopes such that the xPC Target scopes wait until they
are triggered to acquire data. You can configure xPC Target scopes to start
acquiring data when the following scope trigger conditions are met. These
are k now n as trigger modes.
2-14