Stateflow® 7.1
Product Description
- Introduction and Key Features
- Working with Stateflow
- Creating Stateflow Charts
- Adding Functions
- Executing Stateflow Charts
Executing Stateflow Charts
After modeling your logic in Stateflow, you can simulate and view its behavior live to test and validate your design. A graphical debugger helps you resolve simulation run-time errors and diagnose unexpected behavior in your design.
Visualizing Results
During simulation, you can visualize the Stateflow chart by:
- Highlighting the active states and the transition paths taken
- Viewing states and data with the displays and scopes provided in Simulink
- Building your own custom displays using MATLAB visualization and graphical user interface development tools
After simulation, you can log states and data for postprocessing.
Debugging a Simulation
The Stateflow debugger lets you set breakpoints, control the simulation execution, and display model information. It can be run from a graphical user interface (GUI) or from the MATLAB command line. The GUI provides clear information about the chart's execution status. You can display information on breakpoints, current data values, active states, and the call stack.
Run-time errors can also be detected with the debugger. These include state inconsistencies, transition conflicts, data range violations, potential infinite loops, and ill-specified truth tables.
| Stateflow debugger, which can set breakpoints, start and stop simulations, evaluate run-time errors, and perform dynamic error checking. Click on image to see enlarged view. |
Validating Your Design
You can map requirements directly to Stateflow objects and collect model coverage metrics using Simulink® Verification and Validation (available separately).
Generating Code
Stateflow charts can be deployed to many applications using Stateflow Coder (available separately).
Store

