| Stateflow User's Guide | ![]() |
Stateflow Uses Data Variables
In the following example, discussed in Stateflow Chooses Destinations with Junctions, outside temperature is represented by the variable temp.
temp is an example of Stateflow data. Stateflow data are variables or constants that you define for Stateflow diagrams.
You can define local data used only within the Stateflow diagram or you can define input or output data that you receive from or send to the Simulink model, respectively.
The following diagram shows two data inputs from Simulink.
In this example, the data temp_init receives its value from a Constant block in Simulink as the minimum setpoint temperature for the physical plant. temp, the temperature of the physical plant, is updated as input data from the physical plant in Simulink during simulation.
| Stateflow Chooses Destinations with Junctions | Watching Stateflow Execute During Simulation | ![]() |
© 1994-2005 The MathWorks, Inc.