Stateflow    

Define 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 the machine name (same as the Simulink model name) in the Object Hierarchy list.
  3. Click 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.
  1. Leave all other fields with their default values.

  1. Select OK to apply the changes and close the window.
  2. Choose Close from the Explorer File menu to close the Explorer.

  Create a Stateflow Diagram Define the Stateflow Interface