| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
| On this page… |
|---|
Chart semantics describe execution behavior according to the interaction of graphical and nongraphical constructs.
Graphical constructs consist of objects that appear graphically in a chart. You use the object palette in the Stateflow Editor to build graphical constructs (see Using the Stateflow Editor).
| Graphical Constructs | Types | References |
|---|---|---|
Flow graphs |
| Modeling Logic Patterns and Iterative Loops Using Flow Graphs |
Functions |
| |
Junctions |
| |
States |
| |
Transitions |
|
Nongraphical constructs appear textually in a chart and often refer to data and events (see Defining Data and Defining Events). You follow syntax rules of the Stateflow action language to build nongraphical constructs (see Using Actions in Stateflow Charts).
Examples of nongraphical constructs include:
Conditions and condition actions
Function calls
State actions
Temporal logic statements
The following chart shows commonly used graphical and nongraphical constructs.

| Chart Construct | Graphical or Nongraphical? | Description | Reference |
|---|---|---|---|
| Condition | Nongraphical | Boolean expression that specifies that a transition path is valid if the expression is true; part of a transition label | |
| Condition action | Nongraphical | Action that executes as soon as the condition evaluates to true; part of a transition label | |
| Connective junction | Graphical | Object that enables representation of different possible transition paths in a flow graph | |
| Default transition | Graphical | Object that specifies which state to enter when two or more exclusive (OR) states exist at the same level of hierarchy | |
| Embedded MATLAB function | Graphical | Method of performing computations using a subset of the MATLAB language | |
| Flow graph | Graphical | Construct that models logic patterns by using connective junctions and transitions | Modeling Logic Patterns and Iterative Loops Using Flow Graphs |
| History junction | Graphical | Object that remembers the previously active state at the level of hierarchy in which it appears | |
| State actions | Nongraphical | Expressions that specify actions to take when a state is active, such as initializing or updating data; part of a state label | |
| State with exclusive (OR) decomposition | Graphical | State where no more than one substate can be active at a time | |
| State with parallel (AND) decomposition | Graphical | State where all substates can be active at the same time | |
| Substate | Graphical | State that resides inside another state | |
| Superstate | Graphical | State that contains one or more states | |
| Transition guarded by input event | Graphical | Decision path that occurs if the chart receives a specific event broadcast from another block in the model |
For details on how these graphical and nongraphical constructs interact during chart execution, see How Chart Constructs Interact During Execution.
For detailed information on types of chart semantics, see these references.
| Topic | Reference |
|---|---|
How do events affect chart execution? | |
How does a chart switch between being active and inactive? | |
In what order do flow graphs execute? | |
In what order do outgoing transitions from a single source execute? | |
What happens when you enter, execute, or exit a state? | |
How do parallel (AND) states work? | |
How does early return logic affect chart execution? |
For detailed examples of chart semantics, see Semantic Examples.
![]() | Stateflow Chart Semantics | How Chart Constructs Interact During Execution | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |