Main Content

Stateflow.MachineDebug

Debugger properties for charts in Stateflow machine

    Description

    Use a Stateflow.MachineDebug object to specify the debugger properties for the charts in a Stateflow® machine.

    Creation

    Each Stateflow machine has its own Stateflow.MachineDebug object. To access the Stateflow.MachineDebug object, use the Debug property for the Stateflow.Machine object.

    Properties

    expand all

    Stateflow API objects have properties that correspond to the values you set in the Stateflow Editor. To access or modify a property, use dot notation. To access or modify multiple properties for multiple API objects, use the get and set functions, respectively. For more information, see Modify Properties and Call Functions of Stateflow Objects.

    Animation properties for charts in the machine, specified as a Stateflow.MachineAnimation object with these properties:

    • Enabled — Whether to animate the charts in the machine during simulation, specified as a numeric or logical 1 (true) or 0 (false). Disabling this property is equivalent to selecting None in the Animation Speed drop-down list in the Debug tab.

    • Delay — Delay that the chart animation uses for highlighting each transition segment in the machine, specified as a scalar. These values correspond to the settings of the Animation Speed drop-down list in the Debug tab:

      Delay ValueAnimation Speed
      0.5Slow
      0.2Medium
      0Fast
      -1Lightning Fast

    • MaintainHighlighting — Whether to maintain the highlighting of active states in the machine after the simulation ends, specified as a numeric or logical 1 (true) or 0 (false).

    Examples

    collapse all

    Access the Stateflow.MachineDebug and Stateflow.MachineAnimation objects for the Stateflow.Machine object machine.

    debug = machine.Debug;
    animation = debug.Animation;

    Enable animation and set delay to -1.

    animation.Enabled = true;
    animation.Delay = -1;

    Version History

    Introduced before R2006a