Conversion Strategies

Componentization

Converting SystemBuild™ models to Simulink® models enables you to simulate sections of the overall model. It also allows you to more easily run existing SystemBuild level tests and confirm the validity of the conversion. You can componentize your converted SystemBuild model using library link and model reference conversion capabilities. If you are creating multiple models during the conversion process, either through multiple conversion invocation or subsequent conversions of atomic subsystems into model references, having a single configuration set object (see Referencing Configuration Sets) with your desired configurations for all models can simplify conversions.

The benefits of componentization of your SystemBuild model include:

SB2SL creates one top-level model per conversion. By default, it configures the converted model to work with the Simulink Model block to allow for the creation of a model reference component in another model or library.

If you do not want to use referenced models but do want to use design components, convert the top-level model into an atomic subsystem:

  1. Open a new or existing library.

  2. Drag an Atomic Subsystem block into that library.

  3. In the Simulink model editor window of the top-level model, select Edit > Select all.

  4. In the Simulink model editor window of the top-level model, select Edit > Copy.

  5. In the new or existing library, double-click the Atomic Subsystem block.

    The subsystem is displayed.

  6. In the Simulink model editor of the Atomic Subsystem block, select Edit > Paste.

    The contents of the top-level model are now in the Atomic Subsystem block.

  7. Close the Atomic Subsystem block.

  8. Save and close the top-level model and library.

Unconverted SuperBlocks

If the SystemBuild model contains a SuperBlock that SB2SL cannot convert (for example, an external SuperBlock that is referenced by the SystemBuild model), you can still create a link to that unconverted block by doing one of the following:

Improving Signal Line Wiring Results

When SB2SL converts a SystemBuild model into a corresponding Simulink model, it connects the blocks as best as it can. If you are dissatisfied with these results, you can improve the wiring results of the signal lines by:

Wiring Cleanup Tips

The following guidelines describe how you can visually clean a Simulink model that results from a SystemBuild model translation:

Modeling PatternIn the Simulink Model Editor...
Multiple lines in parallel going to multiple destinations can cause visually undesired wiring in your model. The use of Mux and Demux blocks can cause these issues.

Perform one or all of the following:

  • Route a single line to a copy of the Demux block next to the destination. This line enables one wire to be used for the majority of the routing instead of multiple wires.

  • Rotate and resize blocks and connectors.

  • Select the Mux or Demux block and use the Format > Flip Block command to rotate the block 180 degrees to change the wiring visually.

Excessively autorouted lines can cause visually undesired wiring.

Perform one or all of the following:

  • Turn off autorouted lines in the SB2SL GUI (Build > Options, click Build tab, and clear the Route wires around blocks check box).

  • Resize Mux and Demux blocks to line up their corresponding ports. This alignment helps remove diagonal wiring.

The following example shows the appearance of the sbpend model when you turn off autorouted lines.

The following example shows the appearance of the sbpend model when you turn on autorouted lines.

Use the Format menu commands on the Simulink model editor for basic graphical cleanup of a model, such as block mass alignments and relative alignments.

Silencing Unconnected Port Warnings

After conversion, SB2SL might generate a model with unconnected blocks. By default, unconnected blocks cause warnings each time you update the model diagram. To avoid these warnings, use one of the following:

If you do not want the unconnected lines to be terminated, and you do not want to display the warnings in your MATLAB Command Window, you can suppress these messages with the following:

  1. Before conversion, disable the addition of Terminator and Ground blocks in the SB2SL GUI (Build > Options, click Build tab, and clear the Add Terminator and Ground blocks check box).

  2. In the MATLAB Command Window, type the following:

    warning('off','Simulink:SL_InputNotConnected')
    warning('off','Simulink:SL_OutputNotConnected')
  3. When you want to reenable the warnings, type the following:

    warning('on','Simulink:SL_InputNotConnected')
    warning('on','Simulink:SL_OutputNotConnected')

These commands are session-wide commands that affect all Simulink models until you exit the MATLAB environment or change the warning settings.

Migrating to a Native Simulink® Modeling Style

Once you have a functioning baseline model, consider the following guidelines to take advantage of the Simulink software capabilities. There are no SystemBuild correlations.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS