Main Content

Stateflow Charts

Design modal logic in graphical form

Model systems with a finite number of states. Use states to graphically denote the modes of the system. Conditional transitions provide pathways between these modes. Control the behavior of your system through actions in states and on transitions.


expand all

ChartImplement control logic with finite state machine
State Transition TableRepresent modal logic in tabular format
Truth TableRepresent logical decision-making behavior with conditions, decisions, and actions


expand all

sfnewCreate Simulink model that contains an empty Stateflow block
sflibOpen Stateflow block library
stateflowOpen Stateflow block library and create Simulink model that contains an empty chart
sfopenOpen Simulink model
sfcloseClose Stateflow chart
sfsaveSave Simulink model
sfprintPrint Stateflow charts
sfhelpOpen Stateflow documentation in Help browser
sfdebuggerOpen Breakpoints and Watch window
sfexplrOpen Model Explorer
sfprefSet user preferences in Stateflow charts


Finite State Machine Concepts

Model finite state machines by using Stateflow® charts.

Represent Operating Modes by Using States

Create states to describe the operating modes of a reactive system.

Transition Between Operating Modes

Use conditional transitions as pathways between states.

Combine Transitions and Junctions to Create Branching Paths

Create decision points in transition paths.

Modeling Guidelines for Stateflow Charts

Efficiently model charts by using states, transitions, and events.

Guidelines for Naming Stateflow Objects

Reserved keywords, name length restrictions, and naming limitations.

Model an Assembly Line Feeder

Program a chart based on the operating modes of a feeder system.