IBM Support

Setting correct code generation settings in Simulink for Rhapsody import using Configuration Sets

Product Documentation


Abstract

The default code generation settings in MATLAB SImulink are not compatible with Rhapsody. To import a Simulink model (and its generated code) into a Rhapsody SimulinkBlock you must manually change the settings in each Simulink Model.

However, you can use Configuration Sets to add these as presets to a Simulink model without having to remember each setting.

The Configuration Set used in this guide can be found at the bottom of the page, along with the example MATLAB project.

Content

  1. Here we have a two Simulink models in a MATLAB project:

     MatlabProject
  2. Open both of the Simulink models and from one of the model windows, select the "Model Explorer" button on the toolbar:

    SImulink Menu
  3. Right-click a Simulink model and select "Import...". 

    image

  4. Browse to the RhapsodyCodeGenConfigSet.mat file (you can find the file for download at the bottom of this page) and open it.

    image

  5. The configuration file is added to the Simulink Model view. You can rename it if you wish.
    Note the default Configuration Set is still present in the model view. Before we can delete it we should make the new Configuration set active.


    image
  6. Right-click the Configuration Set and select Activate. 

    image

  7. Right-click the Simulink model in the viewer and select "Save".
     

  8. Repeat steps 3-7 for each Simulink model.

Note, Simulink may require other settings to be used depending on the type of model you have created. These issues will be highlighted during Simulink code generation. For example, "Fixed" or "Variable" step settings may be invalid for the type of Simulink model. Please follow Simulink instructions to correct any issues that may arise.

Downloads:

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Component":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.1.5;8.2;8.2.1;8.3;8.3.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

More support for:
IBM Engineering Systems Design Rhapsody

Software version:
8.1.5, 8.2, 8.2.1, 8.3, 8.3.1

Operating system(s):
Windows

Document number:
715997

Modified date:
27 May 2022

UID

ibm10715997

Manage My Notification Subscriptions