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:
- Select Explore from the Stateflow editor's Tools menu.
- 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.
- Select the Stateflow machine to which you want to add the RTW target.
- The Explorer displays the selected Stateflow machine's data, events, and targets in the contents pane.
- Select Target from the Explorer's Add menu to add a target with the default name "untitled" to the selected machine.
- Rename the target.
- Follow the steps in the next topic to rename the target to
rtw
.
Note
A Stateflow machine can have only one RTW target.
|
Renaming the Target
To rename the target:
- Select the target in the Explorer's Contents pane and right-click.
- Select Rename from the resulting context menu.
- The Explorer redisplays the selected target's name in an edit box.
- Change the target's name in the edit box.
- Click outside the edit box to close it.
| Configuring a Target | | Accessing the Target Builder Dialog for a Target |  |