主要内容

Default Transition

R2026b

Transition with a destination but no source that specifies the initial substate to enter

Description

A default transition specifies which exclusive (OR) substate becomes active when a chart or superstate is entered. In a chart that contains no states, a default transition marks the start of a flow chart. A default transition has a destination, but no source object. In the Stateflow® Editor, a default transition appears as an arrow terminating at its destination.

To add a default transition to a chart:

  1. In the object palette, click the Default Transition icon The Default Transition object palette icon..

  2. In the chart canvas, click near the state or junction that you want to be the destination of the default transition.

  3. Drag the pointer to the destination state or junction and release.

  4. Optionally, enter a label on the transition to specify conditions, triggers, or actions.

Properties

expand all

To edit graphical object properties interactively, right-click the object and select Properties.

To modify default transition properties programmatically, use Stateflow.Transition objects.

Transition

Source of the default transition. For a default transition, this property is always ~, which indicates that the transition has no source object.

Destination of the default transition, specified as a state or junction in the chart. This property is read-only. Click the hyperlink to navigate to the destination object in the Stateflow Editor.

Parent of the default transition in the model hierarchy, specified as a chart, state, box, or function. This property is read-only. Click the hyperlink to navigate to the parent object.

Execution order for the default transition when its parent has multiple default transitions, specified as a positive integer. For a chart that contains only one default transition, this value is always 1. This property applies only when the chart uses a user-specified execution order for a state or a transition.

Whether to treat the default transition as a variant transition. When you select this property, the transition participates in variant condition evaluation.

Label for the default transition, specified as a text string. Enter a trigger, condition, condition action, and transition actions.

Description of the default transition, specified as a text string.

Link to documentation for the default transition, specified as a web URL or a MATLAB® command that displays documentation as an HTML file or as text in the MATLAB Command Window. When you click the Document link hyperlink, Stateflow evaluates the link and displays the documentation.

Version History

Introduced before R2006a