Main Content

Stateflow.MachineAnimation

Animation properties for charts in Stateflow machine

    Description

    Use a Stateflow.MachineAnimation object to specify the animation properties for the charts in a Stateflow® machine.

    Creation

    Each Stateflow machine has its own Stateflow.MachineAnimation object. To access the Stateflow.MachineAnimation object, use the Debug.Animation 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.

    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 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

    This property applies only when the Enable property of the machine is true.

    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