Documentation Center

  • Trial Software
  • Product Updates

Restrictions for Converting to Atomic Subcharts

Rationale for Restrictions

Atomic subcharts facilitate the reuse of states and subcharts as standalone objects. The restrictions in the following sections help you get the benefits described in Benefits of Using Atomic Subcharts.

Access to Data, Graphical Functions, and Events

To convert a state or subchart to an atomic subchart, access to objects not parented by the state or subchart must be one of the following:

  • Chart-level data

  • Chart-level graphical functions

  • Input events

If the state or subchart accesses a chart-level graphical function, the chart must export that function. For more information, see Export Functions for Reuse in Other Charts.

Use of Event Broadcasts

The state or subchart that you want to convert to an atomic subchart cannot refer to:

  • Local events that are outside the scope of that state or subchart

  • Output events

However, the state or subchart you want to convert can refer to input events.

Access to Local Data with a Nonzero First Index

The state or subchart that you want to convert to an atomic subchart cannot access local data where the First index property is nonzero. For the conversion process to work, the First index property of the local data must be zero, which is the default value.

Use of Machine-Parented Data

The state or subchart that you want to convert to an atomic subchart cannot reside in a chart that uses machine-parented data with the following properties:

  • Imported or exported

  • Is 2-D or higher, or uses a fixed-point type

Machine-parented data with these properties prevent reuse of generated code and other code optimizations.

Use of Strong Data Typing with Simulink Inputs and Outputs

To convert a state or subchart to an atomic subchart, your chart must use strong data typing with Simulink® inputs and outputs. To specify strong data typing:

  1. Open the Chart properties dialog box.

  2. Select Use Strong Data Typing with Simulink I/O.

  3. Click OK to close the dialog box.

Use of Supertransitions

The state or subchart that you want to convert to an atomic subchart cannot have any supertransitions crossing the boundary.

Masked Library Chart

You cannot use a masked library chart containing mask parameters as an atomic subchart.

Was this topic helpful?