User`s guide
Building Generic Real-Time Programs
2-17
substitute the numerical values of the model parameters in place of the
variable names. It also instructs Simulink to propagate constant sample times,
which improves performance by placing constant operations into the start-up
code. You can also customize the template makefile and the
make commands;
these options are discussed later in this chapter.
Clicking
Generate code only tells the Real-Time Workshop to generate the C
code without compiling, meaning that object and executable files are not
created. Clicking
Retain .rtw file directs the Real-Time Workshop to save the
model.rtw file. By default, this file is deleted during the build process. For
more information about customizing the build process, see “Automatic
Program Building” on page 3-3.
Data Logging
This example uses the Real-Time Workshop’s MAT-file Data Logging facility to
save system states and outputs, as well as the simulation time. To do this,
select the Workspace I/O page of the Simulation Parameters dialog box.
Checking the Time, States, and Outputs options directs the Real-Time
Workshop to log the simulation time, any discrete or continuous states, and
any root Outport blocks. This is a picture of the Workspace I/O page:
For example, if you checked the Time and Outputs logging options, the
Real-Time Workshop saves the inputs to all Scope blocks that are configured to
save data to the workspace, the simulation time, and the root Output blocks in