Represent modal logic in tabular format
Use this block when you want to represent modal logic in tabular format. The State Transition Table block uses only MATLAB® as the action language.
If you double-click the State Transition Table block in
the State Transition Table Editor shows the default layout of state-to-state
Using the State Transition Table Editor, you can:
Add states and enter state actions
Add hierarchy among your states
Enter conditions and actions for state-to-state transitions
Specify default transitions, inner transitions, and self-loop transitions
Add input or output data and events
Set breakpoints for debugging
Run diagnostics to detect parser errors
View auto-generated content as you edit the table
For more information about the State Transition Table Editor, see State Transition Table Operations in the Stateflow documentation.
You can add data and events from the State Transition Table Editor:
|Inputs and outputs|
Chart > Add Inputs & Outputs > Data Input from Simulink
Chart > Add Inputs & Outputs > Data Output to Simulink
|You can add inputs from the model and outputs to the model.|
Chart > Add Other Elements
You can add these types of data:
Chart > Add Inputs & Outputs > Event Input from Simulink
An input event causes a State Transition Table block to execute when a Simulink® control signal changes or through a Simulink block that outputs function-call events. You can use one of these input triggers:
Chart > Add Inputs & Outputs > Event Output to Simulink
|A output event triggers a function call
to a subsystem. You can use one of these output triggers:|
For more information, see Create a Function-Call Subsystem.
The State Transition Table block accepts input signals of any data type that Simulink supports, including fixed-point and enumerated data types.
For a description of the block parameters, see the Subsystem block reference page.
Specified in the Sample time parameter
Yes, if enabled for continuous-time systems
For more information, see When to Enable Zero-Crossing Detection.