Stateflow User's Guide Previous page   Next Page

Configuring a Simulation Target for Stateflow

You can configure your model to simulate the Stateflow blocks in your model by configuring the Stateflow simulation target (sfun). Any model that contains one or more Stateflow blocks has a Stateflow simulation target. When you configure this target and build the model for simulation, this target configuration is carried into the simulation configuration for the entire model.

To configure the Stateflow simulation target, do the following:

  1. From the Stateflow diagram editor Tools menu, select Open Simulation Target.
  1. The Stateflow Target Builder dialog appears.

  1. Select one of the following build options:
  2. To specify code generation options for a simulation target, select Coder Options.
  1. The Simulation Coder Options dialog box appears.

  1. Select OK or Apply for any or all of the following options:

  1. Select (check) the Use settings for all libraries option if you want the settings that you specify for this target to apply to all the Stateflow charts contributed by library models as well.
  2. To specify custom code options for the simulation target, select Target Options.
  1. See Integrating Custom Code with Stateflow Targets for details on using the simulation target to integrate custom code with generated code for the Stateflow diagrams in the model.

  1. To finish configuring the simulation target, do one of the following:


Previous page  Adding a Stateflow Target Configuring Real-Time Workshop for Stateflow Next page

© 1994-2005 The MathWorks, Inc.