Stateflow    

Defining Input Events

Add and define input events within the Stateflow diagram:

  1. Choose Explore from the graphics editor Tools menu to invoke the Explorer.
  2. Double-click on the machine name (same as the Simulink model name) in the Object Hierarchy list.
  3. Click on the On_off chart entry in the Object Hierarchy list.
  4. Select Event from the Add menu.
  5. Double-click the event icon in the Explorer entry for the event to display the event's property dialog.
  6. Enter Switch in the Name field of the Event properties dialog box.
  7. Select Input from Simulink as the Scope value.
  8. Select Rising Edge as the Trigger type.
  9. Click on the OK button to apply the changes and close the window.
  10. Choose Close from the Explorer File menu to close the Explorer.

 Creating a Stateflow Diagram Defining the Stateflow Interface