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 Stateflow Editor Operations).
Nongraphical constructs appear textually in a chart and often refer to data, events, and messages. See Add Stateflow Data, Define Events, and Define Messages in a Stateflow Chart for details. Examples of nongraphical constructs include:
Conditions and condition 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 chart|
|Default transition||Graphical||Object that specifies which state to enter when two or more exclusive (OR) states exist at the same level of hierarchy|
|Flow chart||Graphical||Construct that models logic patterns by using connective junctions and transitions|
|History junction||Graphical||Object that remembers the previously active state at the level of hierarchy in which it appears|
|MATLAB function||Graphical||Method of performing computations using a subset of the MATLAB language|
|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.
How do events affect chart execution?
How does a chart switch between being active and inactive?
In what order do flow charts 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.