This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Divide a Chart into Separate Units

An atomic subchart is a graphical object that helps you to create standalone subcomponents in a Stateflow® chart. Atomic subcharts are supported only in Stateflow charts in Simulink® models. For more information, see Create Reusable Subcomponents by Using Atomic Subcharts.

Goal of the Tutorial

Assume that you have the following model, and the chart has two states:

Suppose that you want to edit state A separately, while someone else is editing state B. You can convert state A to an atomic subchart for storage in a library model. After replacing state A with a linked atomic subchart, you can make changes separately in the library. These changes propagate automatically to the chart that contains the linked atomic subchart.

Edit a Model to Use Atomic Subcharts

  1. Right-click state A and select Group & Subchart > Atomic Subchart.

  2. Create a new library model.

  3. Copy the atomic subchart and paste in your library.

  4. Save your library model.

  5. In your main chart, delete state A.

  6. Copy the atomic subchart in your library and paste in your main chart.

You can now edit state A separately from state B without any merge issues.