Stateflow User's Guide Previous page   Next Page

Adding Events in the Model Explorer

If you add events in the Model Explorer, you can choose any Stateflow object to parent the new event. This event is visible to the parent object and all child objects of the parent. To add an event in the Model Explorer, do the following:

  1. Select Explore from the Stateflow editor's Tools menu.
  1. Stateflow opens the Model Explorer.

    If no object is selected, the current diagram or subchart is highlighted in the Model Hierarchy pane of the Model Explorer. Otherwise, the selected object is highlighted. In the preceding example, state Off is selected in the Stateflow diagram myChart when the Model Explorer is called.

  1. Select the object (machine, chart, or state) in the object hierarchy pane where you want the new event to be visible.

  1. In the preceding example, the Stateflow chart myChart is selected to receive the new event.

  1. From the Add menu of the Model Explorer, select Event.
  1. Stateflow adds a default definition for the new event in the data dictionary and displays an entry row for the new event in the Explorer's Contents pane.

  1. Change the properties of the event you add in one of the following ways:

Previous page  Adding Events in the Stateflow Diagram Editor Setting Event Properties in the Event Dialog Next page

© 1994-2005 The MathWorks, Inc.