| Contents | Index |
| On this page… |
|---|
Each Stateflow block interfaces to its Simulink model. Each Stateflow block can interface to sources external to the Simulink model (data, events, custom code). Events and data are the Stateflow objects that define the interface from the point of view of the Stateflow block.
Events can be local to the Stateflow block or can be propagated to and from the Simulink model and sources external to it. Data can be local to the Stateflow block or can be shared with and passed to the Simulink model and to sources external to the Simulink model.
The Stateflow interfaces include:
Physical connections between Simulink blocks and the Stateflow block
Event and data information exchanged between the Stateflow block and external sources
The properties of a Stateflow chart
Graphical functions exported from a chart
See Exporting Chart-Level Graphical Functions for more details.
The MATLAB workspace
See Calling Built-In MATLAB Functions and Accessing Workspace Data for more details.
Definitions in external code sources
Defining the interface for a Stateflow block in a Simulink model involves some or all the tasks described in the following topics:
Specify the update method for a Stateflow block in a Simulink model.
This task is described in Setting the Stateflow Block Update Method.
Define the input and output data and events that you need.
See the following topics for detailed information:
Add and define any nonlocal data and events with which your Stateflow chart must interact.
Define relationships with any external sources.
See the topics MATLAB Workspace Interfaces and Interface to External Sources.
The preceding task list is a typical sequence. You might find that another sequence better complements your model development.
See Implementing Update Interfaces to Simulink Models for examples of implemented interfaces to Simulink models.
See the following references for defining the interface of a Stateflow Chart block in a Simulink model:
![]() | Defining Interfaces to Simulink Models and the MATLAB Workspace | Specifying Chart Properties | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |