IBM® Rational® Rhapsody® allows
you to integrate MathWorks Simulink models into Rational Rhapsody designs.
MathWorks Simulink models are represented as "Simulink blocks" in
the UML model, and these blocks can interact with Rational Rhapsody objects/parts
or other Simulink blocks.
About this task
The integration of Simulink blocks into Rational Rhapsody uses
a "black box" approach, in which only the input/output ports of the
Simulink blocks are exposed, appearing as flowports in the Rational Rhapsody model.
To send/receive data to/from a Simulink block, you use links to connect
flowports to flowports of other Simulink blocks or of other Rational Rhapsody objects.
When code is generated for a Rational Rhapsody model
containing Simulink blocks, the code generated by Simulink is wrapped
into the Rational Rhapsody-generated
code.
If changes are made to the Simulink model,
you can synchronize the representation of the Simulink model in your Rational Rhapsody project
with the updated model.
The following software
is required for integrating Simulink components into a Rational Rhapsody model:
- Matlab must be available and licensed (Matlab 7),
with Simulink (version 6) and the Real-Time Workshop component (which
generates C and C++ code from Simulink models).
- Version 7.0 or later of the Rational Rhapsody product
Procedure
In general, the process for including
such Simulink components in a Rational Rhapsody model
is as follows:
- Build the Simulink model using Real-Time
Workshop.
- Import the model into Rational Rhapsody as
a SimulinkBlock. The Simulink input and output ports will appear
as atomic flowports on the SimulinkBlock element. (See Flow
ports.)
- Connect the flowports of the SimulinkBlock
element to the flowports of the relevant elements in the Rational Rhapsody model.
Note: The
..\Samples directory
contains a sample
Rational Rhapsody model
that includes Simulink integration.