Supported State Machines

Create classic, Mealy, and Moore charts.

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.


ChartImplement control logic with finite state machine


sfnewCreate model containing empty Stateflow block


Finite State Machine Concepts

Explains what a finite state machine is and how it relates to a Stateflow® chart

Overview of Mealy and Moore Machines

Describes the basic semantics of Mealy and Moore machines

Create Mealy and Moore Charts

Describes the workflow for creating Mealy and Moore charts

Specify Chart Properties

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

Stateflow Hierarchy of Objects

Describes the containment hierarchy of Stateflow objects

Design Considerations for Mealy Charts

Describes best practices for implementing Mealy semantics in charts

Design Considerations for Moore Charts

Describes best practices for implementing Moore semantics in charts

Effects of Changing the Chart Type

Presents guidelines for when you should and should not change chart types

Set Stateflow Block Update Method

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

Model a Vending Machine Using Mealy Semantics

The following chart uses Mealy semantics to model a vending machine.

Model a Traffic Light Using Moore Semantics

The following chart uses Moore semantics to model a traffic light:

Debug Mealy and Moore Charts

Explains how diagnostic messages help you debug Mealy and Moore charts

Was this topic helpful?