User`s guide

2 Getting Started with the Real-Time Workshop
2-30
Real-Time Interface (RTI)
When using the Real-Time Workshop with dSPACE hardware, you must
generate target-specific software. The key software component for this
configuration is the dSPACE Real-Time Interface to Simulink. The RTI, with
special versions available for various dSPACE processor boards (C31, C40,
DEC Alpha, etc.), is available directly from dSPACE and dSPACE distributors.
Executing code generated from the Real-Time Workshop on a particular target
in real-time requires target-specific code. Target-specific code includes I/O
device drivers and an interrupt service routine. Other components, such as a
communication link with Simulink, are required if you need the ability to
download parameters on-the-fly to your target hardware. The dSPACE RTI
provides this support. Since these components are specific to particular
hardware targets (in this case dSPACE hardware), you must ensure that these
target-specific components are compatible with the target hardware. To allow
you to build an executable, dSPACE also provides a target makefile specific to
a particular dSPACE processor board. This target makefile invokes the
crosscompiler, which is also available from dSPACE.
When used in combination with the Real-Time Workshop, dSPACE products
provide an integrated environment that, once installed, needs no additional
coding.
Building a Real-Time Executable with dSPACE’s RTI
dSPACE provides a set of preconfigured files for use with their hardware and
RTI. These files simplify the process of building a real-time executable and
downloading it to the dSPACE target microprocessor. For operation with
dSPACE, refer to the dSPACE documentation.
Assuming you have already installed dSPACE products on your PC, from the
MATLAB command line, type
dslib. This opens a Simulink block diagram that
includes a set of preconfigured blocks for dSPACE
I/O device drivers. These devices are associated with particular dSPACE
hardware. Add the I/O device drivers as appropriate for your model and for
your dSPACE hardware.
Select the pull-down menu for the
Simulink Parameters dialog box. From this
dialog box, select the Real-Time Workshop page. In the following example, it is
assumed that you are using the dSPACE DS1102 C31 board. When using other
dSPACE processor boards, you must specify the appropriate versions of the