User`s guide
Signal Tracing
3-29
Signal Tracing with MATLAB and Scopes of Type File
This procedure uses the Simulink model xpcosc.mdl as an example, and
assumes you have built the target application for this model. It also assumes
that you have a serial communication connection. This topic describes how to
trace signals with scopes of type
file.
Note The signal data file can quickly increase in size. You should examine
the file size between runs to gauge the growth rate for the file. If the signal
data file grows beyond the available space on the disk, the signal data might
be corrupted.
1 Create an xPC Target application that works with scopes of type file. Type
tg=xpctarget.xpc('rs232', 'COM1', '115200')
2 To get a list of signals, type either
set(tg, 'ShowSignals', 'on')
or
tg.ShowSignals='on'
The MATLAB window displays a list of the target object properties for the
available signals. For example, the signals for the model
xpcosc.mdl are
shown below.
ShowSignals = on
Signals = INDEX VALUE BLOCK NAME
0 0.000000 Integrator1
1 0.000000 Signal Generator
2 0.000000 Gain
3 0.000000 Integrator
4 0.000000 Gain1
5 0.000000 Gain2
6 0.000000 Sum
For more information, see “Signal Monitoring with MATLAB” on page 3-6.