Control the execution of your Stateflow® chart by specifying when transitions between states occur and when actions are executed. Synchronize state execution by broadcasting events. Detect changes in data values and check which states are active during chart execution.
Chart | Implement control logic with finite state machine |
Eliminate Redundant Code by Combining State Actions
Combine entry
, during
, and
exit
actions in a state.
Control Function-Call Subsystems by Using bind Actions
Bind a function-call output event to the activity of a state.
Combine Transitions and Junctions to Create Branching Paths
Create decision points in transition paths.
Supported Operations for Chart Data
Perform mathematical computations in Stateflow charts.
Special symbols available for state and transition actions.
Call Extrinsic MATLAB Functions in Stateflow Charts
Access MATLAB® functions that are not supported for code generation.
Access MATLAB Functions and Workspace Data in C Charts
Call built-in MATLAB functions by using the ml
operator.
Call C Library Functions in C Charts
Access C functions in state and transition labels.
Check State Activity by Using the in Operator
Determine if a state is active during chart execution.
Define chart behavior when data change value between time steps.
Control Chart Execution by Using Temporal Logic
Use event-based and absolute-time temporal logic operators.
Control Chart Behavior by Using Implicit Events
Trigger chart actions by changes in data values and state activity.
Control Oscillations by Using the duration Operator
Simplify debouncing logic in charts that have transient signals.