User`s guide
3 Basic Procedures
3-38
Signal Logging to a Disk Drive
Signal logging is the process of saving (logging) data to a variable in your
MATLAB workspace and then saving that data to a MAT-file on your disk
drive. This allows you to use MATLAB functions for data analysis and
MATLAB plotting functions for visualization. Using the data archiving feature
to provide in the
External Mode Control Panel, you can save data to a file
during execution. You cannot save data to a disk drive during a simulation.
To use the data archiving feature with the Real-Time Windows Target, you
must add a Scope block to your Simulink model, and you must execute a
real-time application.
This section includes the following topics:
• “Entering Scope Parameters” on page 3-30
• “Entering Signal and Triggering Properties” on page 3-32
• “Entering Data Archiving Parameters” on page 3-44
• “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 pane in the Configuration Parameters dialog box.
Entering Scope Parameters
You save data to a disk drive by first saving the data to the MATLAB
workspace through a Simulink Scope block. You need to set scope block
parameters 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 a disk drive. 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 and the Data
Archiving dialog box.