Atomic Subcharts

Encapsulate modal logic in reusable subcomponents

Reuse state components in multiple charts by using atomic subcharts. Generate reusable code from atomic subcharts. Reduce recompilation time for your model by recompiling only the atomic subcharts that you modify.


Create Reusable Subcomponents by Using Atomic Subcharts

Build independent subcomponents in your Stateflow® chart.

Rules for Using Atomic Subcharts

Guidelines for creating atomic subcharts.

Map Variables for Atomic Subcharts and Boxes

Link variables in your atomic subchart to data in the main chart.

Reuse a State Multiple Times in a Chart

This example shows how to use linked atomic subcharts to repeat the same configuration of states and trasitions multiple times in a Stateflow® chart.

Reduce the Compilation Time of a Chart

Speed up simulations by recompiling only some parts of the chart.

Divide a Chart into Separate Units

Compartmentalize the subcomponents of your Stateflow chart.

Generate Separate Code for an Atomic Subchart

Produce independent code for atomic subcharts.

Featured Examples