Stateflow | ![]() ![]() |
Defining Stateflow Interfaces to Simulink
Each Stateflow block corresponds to a single Stateflow diagram. The Stateflow block interfaces to its Simulink model. The Stateflow block can 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 the following 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 Defining Stateflow Interfaces for more information.
![]() | Stateflow Data Dictionary of Objects | Stateflow Diagram Objects | ![]() |