Use finite state machines to model event driven systems. With Mealy charts, you can model finite state machines whose output is a function of current input and the current state. Moore charts model finite state machines whose output depend only on the current state.
|Chart||Implement control logic with finite state machine|
|Create model containing empty Stateflow block|
Explains what a finite state machine is and how it relates to a Stateflow® chart
Describes the basic semantics of Mealy and Moore machines
Describes the workflow for creating Mealy and Moore charts
Tells you how to specify properties for your chart. Part of the interface for a chart to its Simulink® model is set when you specify the properties for a chart
Describes the containment hierarchy of Stateflow objects
Describes best practices for implementing Mealy semantics in charts
Describes best practices for implementing Moore semantics in charts
Presents guidelines for when you should and should not change chart types
Implementing different Stateflow interfaces in a Simulink model requires you to set the update method for your chart. This section describes each of the settings for the update method of your chart
The following chart uses Mealy semantics to model a vending machine.
The following chart uses Moore semantics to model a traffic light:
Explains how diagnostic messages help you debug Mealy and Moore charts