Stateflow    

Defining Stateflow Interfaces

Each Stateflow block corresponds to a single Stateflow diagram. The Stateflow block interfaces to its Simulink model. The Stateflow block may interface to code sources external to the Simulink model (data, events, custom code).

Stateflow diagrams are event driven. Events can be local to the Stateflow block or can be propagated to and from Simulink and code sources external to Simulink. Data can be local to the Stateflow block or can be shared with and passed to the Simulink model and to code sources external to the Simulink model.

You must define the interface to each Stateflow block. Defining the interface for a Stateflow block can involve some or all of these tasks:

In this example, the Simulink model titled sf_intro_example consists of a Simulink Sine Wave source block, a Simulink Scope sink block, and a single Stateflow block, titled On_off.

See Defining Input Events and Chapter 5, Defining Stateflow Interfaces, for more information.


 Anatomy of a Model and Machine Stateflow Diagram Objects