User`s guide

3 Basic Procedures
3-30
Signal Logging to the MATLAB Workspace
Signal logging is the process of saving (logging) data to a variable in your
MATLAB workspace or to a MAT-file on your disk drive. This allows you to use
MATLAB functions for data analysis and MATLAB plotting functions for
visualization. You can save data to a variable during a simulation or during an
execution.
To use signal logging with the Real-Time Windows Target, you must add a
Scope block to your Simulink model.
This section includes the following topics:
“Entering Scope Parameters” on page 3-30
“Entering Signal and Triggering Properties” on page 3-32
“Plotting Logged Signal Data” on page 3-35
Simulink external mode does not support data logging with Outport blocks in
your Simulink model. This means you do not enter or select parameters on the
Data I/O tab in the Configuration Parameters dialog box.
Entering Scope Parameters
Data is saved to the MATLAB workspace through a Simulink Scope block.
Scope block parameters need to be set for data to be saved.
After you create a Simulink model and add a Scope block, you can enter the
scope parameters for signal logging to the MATLAB workspace. This procedure
uses the Simulink model
rtwin_model.mdl as an example, and assumes you
have already loaded that model.
Note If you entered the scope parameters for running a simulation, you may
want to look over this procedure, because the
Scope parameters dialog box is
related to the External Signal and Triggering dialog box.
1 In the Simulink window, double-click the Scope block.
A Scope window opens.