User`s guide
2 Targets and Scopes in the MATLAB
®
Interface
1 In the MATLAB window, type
sc=tg.addscope('file')
The xPC Target software creates a scope of type file for the application.
2 Type
sc.addsignal(4)
3 To s tart the scope, type
+sc
4 To start the target application, type
+tg
ThexPCTargetsoftwareaddssignal4tothescopeoftypefile. Whenyou
start the scope and application, the scope saves the signal data for signal 4 to
afile,bydefaultnamed
C:\data.dat.
See “Scope of Type File” on page 3-51 in Chapter 3 , “Signals and Parameters”
for a description of scopes o f type
file.
If you want to acquire signal data into multiple files, see “Acquiring Signal
Data into Multiple, Dynamically Named Files with Scopes of Type File” on
page 2-12.
Acquiring Signal Data into Multiple, Dynamically
Named Files w ith Sco pe s of Type File
You can acquire signal data into multiple, dynamically named files on the
target PC. For example, you can acquir edataintomultiplefilestoexamine
onefilewhilethescopecontinuestoacquire data into other files. To acquire
data in m ultiple files, 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. You can then config ure that scope to log
signal data to multiple files.
2-12