User`s guide
Working with Scope Objects
2-11
1 In the MATLAB window, type
allscopes(1).addsignal([0,1])
2 Alternatively, you can type
addsignal(allscopes(1), [0,1])
Acquiring Signal Data with Scopes of Type File
You can acquire signal data into a file on the target PC. To do so, you add a
scope of type
file to the application. After you build an application and
download it to the target PC, you can add a scope of type
file to that
application.
For example, to add a scope of type
file named sc to the application, and to
add signal
4 to that scope,
1 In the MATLAB window, type
sc=tg.addscope('file')
xPC Target creates a scope of type file for the application.
2 Type
sc.addsignal(4)
xPC Target adds signal 4 to the scope of type file. When you start the scope
and application, the scope saves the signal data for signal
4 to a file, by
default named
C:\data.dat.
See “Scope of Type File” on page 3-34 in Chapter 3, “Signals and Parameters,”
for a description of signal tracing with scopes of type
file.
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
known as trigger modes.