View documentation for other releases
Learn more about Stateflow
• Getting Started
• Product Description
Key Features
What Does a Stateflow Chart Look Like?
How Stateflow Software Works with Simulink Software
Basic Tutorial for Modeling Event-Driven Systems
• Installing Stateflow Software
Installation Instructions
Prerequisite Software
Product Dependencies
Setting Up Your Own Target Compiler
Using Stateflow Software on a Laptop Computer
Related Products
The Stateflow Chart
How the Stateflow Chart Works with the Simulink Model
A Look at the Physical Plant
Running the Model
• Implementing the Interface with Simulink
Build It Yourself or Use the Supplied Model
Design Considerations for Defining the Interface
Adding a Stateflow Block to a Simulink Model
Defining the Inputs and Outputs
Connecting the Stateflow Block to the Simulink Subsystem
• Implementing the States to Represent Operating Modes
Design Considerations for Defining the States
Adding the Power On and Power Off States
Adding and Configuring Parallel States
Adding the On and Off States for the Fans
• Implementing State Actions
Design Considerations for Defining State Actions and Variables
Writing an Entry Action
Writing a During Action
• Adding the Transitions
Design Considerations for Defining Transitions Between States
Drawing the Transitions Between States
Adding Default Transitions
Adding Conditions to Guard Transitions
Adding Events to Guard Transitions
• Implementing the Triggers
Design Considerations for Triggering Stateflow Charts
Defining the CLOCK Event
Connecting the Edge-Triggered Events to the Input Signals
• Setting Simulation Parameters and Breakpoints
Prepare the Chart Yourself or Use the Supplied Model
Checking That Your Chart Conforms to Best Practices
Setting the Length of the Simulation
Configuring Animation for the Chart
Setting Breakpoints to Observe Chart Behavior
Simulating the Air Controller Chart
• Debugging Common Modeling Errors
Debugging State Inconsistencies
Debugging Data Range Violations
• User's Guide
• Stateflow Chart Concepts
• Stateflow Chart Notation
• Stateflow Chart Semantics
• Creating Stateflow Charts
• Modeling Logic Patterns and Iterative Loops Using Flow Graphs
• Building Mealy and Moore Charts
• Techniques for Streamlining Chart Design
• Defining Data
• Defining Events
• Using Actions in Stateflow Charts
• Making States Reusable with Atomic Subcharts
• Saving and Restoring Simulations with SimState
• Using Vectors and Matrices in Stateflow Charts
• Using Variable-Size Data in Stateflow Charts
• Using Enumerated Data in Stateflow Charts
• Modeling Continuous-Time Systems in Stateflow Charts
• Using Fixed-Point Data in Stateflow Charts
• Using Complex Data in Stateflow Charts
• Defining Interfaces to Simulink Models and the MATLAB Workspace
• Working with Structures and Bus Signals in Stateflow Charts
• Stateflow Design Patterns
• Debouncing Signals
Why Debounce Signals
The Debouncer Model
Key Behaviors of Debouncer Chart
Running the Debouncer
• Scheduling Execution of Simulink Subsystems
When to Implement Schedulers Using Stateflow Charts
Types of Schedulers
Scheduling Multiple Subsystems in a Single Time Step
Scheduling One Subsystem in a Single Time Step
Scheduling Subsystems to Execute at Specific Times
• Implementing Dynamic Test Vectors with Hierarchy and Parallelism
When to Implement Test Vectors Using Stateflow Charts
A Dynamic Test Vector Chart
Key Behaviors of the Test Vector Chart and Model
Running the Model with Stateflow Test Vectors
• Truth Table Functions for Decision-Making Logic
• Using MATLAB Functions in Stateflow Charts
• Using Simulink Functions in Stateflow Charts
• Building Targets
• Debugging and Testing Stateflow Charts
• Exploring and Modifying Charts
• Semantic Rules Summary
• Semantic Examples
Glossary
• Using the API
• API Object Reference
• API Object Properties and Methods
API Method Reference
• Blocks
• Functions
Examples
• Release Notes
Symbols A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Debouncing Signals
Scheduling Execution of Simulink Subsystems
Implementing Dynamic Test Vectors with Hierarchy and Parallelism
Learn how engineers use Stateflow to model state machines in their Simulink models.
Try the latest version of Stateflow.