State Components

Encapsulate modal logic

Reuse components in multiple charts by using atomic subcharts. Generate reusable code from atomic subcharts. To reduce recompilation time for your entire model, recompile only the atomic subcharts that you modify.


What Is an Atomic Subchart?

Create standalone subcomponents of your chart with atomic subcharts.

Rules for Using Atomic Subcharts

Create your atomic subcharts by following these guidelines.

Reuse a State Multiple Times in a Chart

Create an atomic subchart to reuse and edit the same state multiple times within your chart.

Generate Reusable Code for Atomic Subcharts

Generate reusable code for linked and unlinked atomic subcharts.

Reduce the Compilation Time of a Chart

Reduce your simulation time by recompiling only your atomic subcharts.

Divide a Chart into Separate Units

Use atomic subcharts to create chart componetization.

Convert to and from Atomic Subcharts

Convert your Stateflow® charts to atomic subcharts.

Map Variables for Atomic Subcharts

Ensure that each variable in your atomic subchart maps to the correct variable in the main chart.

Was this topic helpful?