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 sflib, the State Transition Table Editor shows the default layout of state-to-state transitions.
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 Editor Operations in the Stateflow documentation.
You can add data and events from the State Transition Table Editor:
|Inputs and outputs|
Table > Add Inputs & Outputs > Data Input from Simulink
Table > Add Inputs & Outputs > Data Output to Simulink
|You can add inputs from the model and outputs to the model.|
Table > Add Other Elements
You can add these types of data:
Table > 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:
Table > 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.