A state chart is a representation of an event-driven (reactive) system. In an event-driven system, the system makes a transition from one state or mode to another, if the condition defining the change is true.
For example, you can use a state chart to represent the automatic transmission of a car. The transmission has these operating states: park, reverse, neutral, drive, and low. As the driver shifts from one position to another, the system transitions from one state to another, such as from park to reverse.
State charts are often used to model complex logic including:
- Scheduling a sequence of tasks or steps for a system
- Definingfault detection, isolation, and recovery logic
- Supervising how to switch between different modes of operation
Using state charts can provide additional capabilities beyond traditionalfinite state machines, including:
- Modeling hierarchical states for large-scale systems
- Adding flow graphs to define complex decision logic
- Defining orthogonal states to represent systems with parallelism
For details on creating state charts and integrating them into a Simulink®model, see金宝appandStateflow®.