Stateflow User's Guide Previous page   Next Page

Bringing Simulink Parameters into Stateflow

You might want to use Simulink parameters for a parent masked subsystem in a Stateflow diagram. To bring these parameters into Stateflow diagrams, do the following:

  1. In the Simulink mask editor for the parent subsystem, define and initialize a Simulink parameter.
  2. In the Stateflow diagram for the Stateflow block in the masked subsystem, define data with the same name as the parameter.
  3. Select the scope Parameter for the data.

When simulation starts, the data of scope Parameter is resolved at the lowest level by a parameter with the name of the Stateflow data defined for the masked subsystem containing the Stateflow block. If the parameter of a masked subsystem parent does not resolve the value of the data, it continues to be resolved by higher level masked subsystems.


Previous page  Resolving Signal Objects for Output Data Initializing Data from the MATLAB Base Workspace Next page

© 1994-2005 The MathWorks, Inc.