Stateflow    

Adding Output Events to Simulink

The following steps describe how to add and define the necessary fields for an event output to Simulink:

  1. Add an event to the chart using the Stateflow diagram editor or Stateflow Explorer (see Adding Data to the Data Dictionary).
  1. You must add the event to the chart and not to any other object in the chart. Adding an event with the Stateflow diagram editor adds it only to the chart that is visible in the diagram editor. In Stateflow Explorer, you must select (highlight) the chart object in the hierarchy shown in the left pane of the Explorer before adding the event.

  1. Set the Scope field to Output to Simulink.
  1. When you define an event to be Output to Simulink, a Simulink output port is added to the Stateflow block. Output events from the Stateflow block to the Simulink model are scalar.

If you choose to add an event in the Stateflow Explorer, you can also change its Name and Scope properties directly in the Explorer (see Setting Properties for Data, Events, and Targets).


  Adding Input Events from Simulink Adding Input Data from Simulink