| Stateflow User's Guide | ![]() |
Defining Output Events
An output event is an event that occurs in a specific chart and is visible in specific Simulink 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.
The following steps describe how to add and define the necessary fields for an event output to Simulink:
See Defining Edge-Triggered Output Events for an example of a Stateflow block calling an edge-triggered subsystem in Simulink.
Function-call triggers call function-call subsystems the moment the call is made, even if it is made in the middle of a time step. For an example of a Stateflow block calling a function-call subsystem, see Defining Function Call Output Events.
If you choose to add an event in the Model Explorer, you can change its Name, Scope, Trigger and Port properties directly in the Model Explorer. See Setting Properties for Stateflow Objects in the Model Explorer for a description.
| Associating Input Events with Control Signals | Associating an Output Event with an Output Port | ![]() |
© 1994-2005 The MathWorks, Inc.