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.

Blocks

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

Functions

expand all

sfnewCreate Simulink model that contains an empty Stateflow block
sflibOpen Stateflow library window
stateflowOpen Stateflow library window and create Simulink model that contains an empty chart
sfopenOpen existing Simulink model
sfcloseClose Stateflow chart
sfsaveSave chart in current folder
sfprintPrint graphical view of charts
sfhelpOpen Stateflow online help
sfdebuggerOpen Stateflow Debugger
sfexplrOpen Model Explorer
sfprefView and adjust user preferences in Stateflow charts

Topics

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.