Stateflow    

Adding a Target to a Stateflow Machine

Building a target requires that you first add the target to the list of potential targets maintained by Stateflow for a particular model.

To add a target to the model, do the following:

  1. Select Explore from the Stateflow editor's Tools menu.
  1. The Stateflow Explorer appears.

    The Explorer object hierarchy shows the Stateflow machines (Simulink models) currently loaded in memory. In the preceding example, the Stateflow machine fuelsys is just above the chart fuel rate controller (shown as fuel rate...), which is highlighted by default.

  1. Select the Stateflow machine to which you want to add the RTW target.
  1. The Explorer displays the selected Stateflow machine's data, events, and targets in the contents pane.

  1. Select Target from the Explorer's Add menu to add a target with the default name "untitled" to the selected machine.
  2. Rename the target.
  1. Follow the steps in the next topic to rename the target to rtw.

Renaming the Target

To rename the target:

  1. Select the target in the Explorer's Contents pane and right-click.
  2. Select Rename from the resulting context menu.
  1. The Explorer redisplays the selected target's name in an edit box.

  1. Change the target's name in the edit box.
  2. Click outside the edit box to close it.

  Configuring a Target Accessing the Target Builder Dialog for a Target