Stateflow    

Defining Output Events

An output event is an event that occurs in a specific chart and is visible in specific blocks outside the chart. This type of event allows a chart to notify other blocks in a model of events that occur in the chart. To define an event as an output event, set its Scope property to Output to Simulink. You can define multiple output events for a given chart. Stateflow creates a chart output port for each output event that you define (see Port). Your model can use the output ports to trigger the output events in other Simulink blocks in the same model.

Associating an Output Event with an Output Port

An output event's Port property associates the event with an output port on the chart block that parent's the event. The property specifies the position of the port relative to other event ports on the chart block. Event ports appear below data ports on the right side of a chart block. Stateflow numbers ports sequentially from top to bottom, starting with port 1. Stateflow assigns port 1 to the first output event that you define for a chart, port 2 to the second output event, and so on. You can change the default port assignment of an event by resetting its Port property or by selecting the output event in the Explorer and dragging and dropping it to the desired position in the list of output events.


 Defining Input Events Exporting Events