Skip to Main Content Skip to Search
Product Documentation

Model Referencing Limitations

Introduction

The following limitations apply to model referencing. In addition, a model reference hierarchy must satisfy all the requirements listed in Simulink Model Referencing Requirements.

Limitations on All Model Referencing

Index Base Limitations

In two cases, Simulink does not propagate 0-based or 1-based indexing information to referenced-model root-level ports connected to blocks that:

An example of a block that accepts indexes is the Assignment block. An example of a block that produces indexes is the For Iterator block.

The two cases result in a lack of propagation that can cause Simulink to fail to detect incompatible index connections. These two cases are:

General Reusability Limitations

If a referenced model has any of the following characteristics, the model must specify Configuration Parameters > Model Referencing > Total number of instances allowed per top model as One. No other instances of the model can exist in the hierarchy. An error occurs if you do not set the parameter correctly, or if more than one instance of the model exists in the hierarchy. The model characteristics that require that the Total number of instances allowed per top model setting be One are:

Block Mask Limitations

For information about creating and using block masks, see Working with Block Masks.

Simulink Tool Limitations

Stateflow Limitations

You cannot reference a model multiple times in the same model reference hierarchy if that model that contains a Stateflow chart that:

Subsystem Limitations

Other Limitations

Limitations on Normal Mode Referenced Models

Normal Mode Visibility for Multiple Instances of a Referenced Model

You can simulate a model that has multiple instances of a referenced model that are in Normal mode. All of the instances of the referenced model are part of the simulation. However, Simulink displays only one of the instances in a model window. The Normal Mode Visibility setting determines which instance Simulink displays. Normal Mode Visibility includes the display of Scope blocks and data port values.

To set up your model to control which instance of a referenced model in Normal mode has visibility and to ensure proper simulation of the model, see Setting Up a Model with Multiple Instances of a Referenced Model in Normal Mode.

Simulink Profiler

In Normal mode, enabling the Simulink Profiler on a parent model does not enable profiling for referenced models. You must enable profiling separately for each referenced model. See Capturing Performance Data.

Limitation with Sim Viewing Devices in Rapid Accelerator Mode

When set to Normal mode, a Model block with a sim viewing device is not updated during Rapid Accelerator simulation.

Limitations on Accelerator Mode Referenced Models

Subsystem Limitations

If you generate code for an atomic subsystem as a reusable function, when you use Accelerator mode, the inputs or outputs that connect the subsystem to a referenced model can affect code reuse. See Reusable Code and Referenced Models for details.

Simulink Tool Limitations

Simulink tools that require access to the internal data or the configuration of a model have no effect on referenced models executing in Accelerator mode. Specifications made and actions taken by such tools are ignored and effectively do not exist. Examples of tools that require access to model internal data or configuration include:

Runtime Checks

Some blocks include runtime checks that are disabled when you include the block in a referenced model in Accelerator mode. Examples of these blocks include Assignment, Selector, and MATLAB Function blocks)

Data Logging Limitations

The following logging methods have no effect when specified in referenced models executing in Accelerator mode:

During simulation, the result is the same as if the constructs did not exist.

Accelerator Mode Reusability Limitations

You must set Configuration Parameters > Model Referencing > Total number of instances allowed per top model> > to One for a referenced model that executes in Accelerator mode and has any of the following characteristics:

An error occurs in either of these cases:

Customization Limitations

S-Function Limitations

MATLAB Function Block Limitation

A MATLAB Function block in a referenced model that executes in Accelerator mode cannot call MATLAB functions.

Stateflow Limitation

A Stateflow chart in a referenced model that executes in Accelerator mode cannot call MATLAB functions.

Target Limitations

Other Limitations

Limitations on PIL Mode Referenced Models

For more information about using PIL mode with model referencing, see Referenced Models in the Embedded Coder documentation.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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