User`s guide

Quick Start Tutorials
3-7
Quick Start Tutorials
This section provides hands-on experience with the code generation, program
building, data logging, code verification, and external mode capabilities of
Real-Time Workshop.
These tutorials assume basic familiarity with MATLAB and Simulink. You
should also read Chapter 2, “Building an Application” before proceeding.
The procedures for building, running, and testing your programs are almost
identical in UNIX and PC environments. The discussion notes differences
where applicable.
Make sure that a MATLAB compatible C compiler is installed on your system
before proceeding with these tutorials. See “Supported Compilers” in the
Real-Time Workshop User’s Guide documentation and “Supported
“Tutorial 1: Building a
Generic Real-Time Program”
on page 3-9
Shows how to generate C code from a
Simulink demo model and build an executable
program
“Tutorial 2: Data Logging”
on page 3-19
Explains how to modify the demonstration
program to save data in a MATLAB MAT-file
for plotting
“Tutorial 3: Code
Verification” on page 3-25
Demonstrates how to verify a generated
program by comparing its output to that of
the original model under simulation
“Tutorial 4: A First Look at
Generated Code” on
page 3-30
Examines code generated for a very simple
model, illustrating the effects of some of the
Real-Time Workshop code generation options
“Tutorial 5: Working with
External Mode Using GRT”
on page 3–39
Acquaints you with the basics of using
external mode on a single computer, and
demonstrates the value of external mode to
rapid prototyping
“Tutorial 6: Generating Code
for a Referenced Model” on
page 3-51
Introduces generating code for models
referenced with Model blocks, and using
Model Explorer to browse code files