User`s guide
Real-Time Application
3-21
Creating a Real-Time Application
Real-Time Workshop generates C code from your Simulink model, then the
Open Watcom C/C++ compiler compiles and links that C code into a real-time
application.
After you enter parameters into the
Configuration Parameters dialog box for
Real-Time Workshop, you can build a real-time application. This procedure
uses the Simulink model
rtwin_model.mdl as an example, and assumes you
have loaded that model:
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop
, and then click Build Model.
The build process does the following:
- Real-Time Workshop creates the C code source files
rtwin_model.c and
rtwin_model.h.
- The make utility m
ake_rtw.exe creates the makefile rtwin_model.mk
from the template makefile
rtwin.tmf.
- The make utility
make_rtw.exe builds the real-time application
rtwin_model.rwd using the makefile rtwin_model.mk created above. The
file
rtwin_model.rwd is a binary file that we refer to as your real-time
application. You can run the real-time application with the Real-Time
Windows Target kernel.
2 Connect your Simulink model to your real-time application. See “Entering
Additional Scope Parameters for Signal Tracing” on page 3-22.
After you create a real-time application, you can exit MATLAB, start MATLAB
again, and then connect and run the executable without having to rebuild.