User`s guide
Targeting dSPACE
2-31
system target file and template makefile. For the current example, in the
Real-Time Workshop page of the dialog box, specify:
• System target file:
rti1102.tlc
• Template makefile: rti1102.tmf
With this configuration, you can now generate a real-time executable and
download it to the dSPACE processor board. You can do this by clicking the
Build button on the Real-Time Workshop page. The Real-Time Workshop
automatically generates C code and inserts the I/O device drivers as specified
in your block diagram. These device drivers are inserted in the generated C
code as inline S-functions. Inlined S-functions offer advantages in speed and
simplify the generated code. For more information about inlining S-functions,
refer to the Target Language Compiler Reference Guide. For a complete
discussion of S-functions, see Writing S-Functions.
During the same build operation, the template makefile and dialog entries are
combined to form a target makefile for your dSPACE setup. This makefile
invokes the TI cross-compiler and builds an executable that is automatically
downloaded via the ISA bus onto the dSPACE processor board. With additional
support tools from dSPACE, such as Control Desk and COCKPIT, you can view
signals, collect data, and log data in a MATLAB MAT-file format.
You can also change model parameters while the model runs on the target
processor.Therearetwowaystodothis:
•Using Simulink’s external mode
• Using dSPACE’S COCKPIT software
dSPACE Control Desk
Control Desk enables you to capture and view signals using names that appear
in the Simulink block diagram. Multiple signals can be acquired and displayed
from a convenient GUI. Control Desk also includes a signal browser that helps
users scan the model hierarchy and that selects signals to monitor from a
particular subsystem. Options such as data decimation and data acquisition
triggering are available from Control Desk. Once data is collected, you can save
it in a MATLAB MAT-file format for easy import into MATLAB.