Control Chart Execution from the Stateflow Editor

When you set breakpoints on chart objects, you can control chart execution directly from the Stateflow® Editor.

  1. In the editor, start simulation by selecting Simulation > Run.

    When simulation stops at a breakpoint:

    • An execution status badge appears in the graphical object where execution pauses:

      BadgeDescription

      Execution stopped in a state's during action, graphical function, or truth table function.

      Execution stopped before entering a chart or state.

      Execution stopped after exiting a state.

      Execution stopped before taking a valid transition.

      Execution stopped before transition is tested.

    • Options for controlling chart execution appear in the editor tool bar and the Simulation menu.

      OptionDescriptionIconKeyboard Shortcut
      Step Over

      Skip the entire execution of a function call and suspend the simulation.

      F10
      Step In

      Run the next execution step and suspend the simulation.

      F11
      Step Out

      Skip the rest of the execution of a function call and suspend the simulation.

      Shift+F11

  2. Hover over the badge to see execution status.

    A tooltip indicates:

    • Where execution stopped

    • Simulation time

    • Current event, if the chart is processing a local or input event

  3. View data values in the chart. See Watch Stateflow Data Values

  4. Select options for continuing execution, such as Step Over, Step In, or Step Out.

Set conditions and enable/disable breakpoints in the Stateflow Breakpoints and Watch Data window. For more information, see Manage Stateflow Breakpoints and Watch Data.

Was this topic helpful?