An event is a Stateflow® object that can trigger actions in a parallel state, another Stateflow chart, or a Simulink® triggered or function-call subsystem. For more information, see Synchronize Model Components by Broadcasting Events.
When you create Stateflow charts in Simulink models, you can specify event properties in either the Property Inspector or the Model Explorer.
To use the Property Inspector:
In the Modeling tab, under Design Data, select Symbols Pane and Property Inspector.
In the Symbols pane, select the event.
In the Property Inspector pane, edit the event properties.
To use the Model Explorer:
In the Modeling tab, under Design Data, select Model Explorer.
In the Contents pane, select the event.
In the Message pane, edit the event properties.
Name of the event. Actions reference events by their names. Names must begin with an alphabetic character, cannot include spaces, and cannot be shared by sibling events. For more information, see Guidelines for Naming Stateflow Objects.
Scope of the event. The scope specifies where the event occurs relative to the parent object.
|Event that can occur anywhere in a Stateflow machine but is visible only in the parent object and its descendants. For more information, see Broadcast Local Events.|
|Event that occurs in a Simulink block but is broadcast to a Stateflow chart. For more information, see Activate a Stateflow Chart by Sending Input Events.|
|Event that occurs in a Stateflow chart but is broadcast to a Simulink block. For more information, see Activate a Simulink Block by Sending Output Events.|
Index of the port associated with the event. This property applies only to input and output events.
For input events, port is the index of the input signal that triggers the event. For more information, see Association of Input Events with Control Signals.
For output events, port is the index of the signal that outputs this event. For more information, see Association of Output Events with Output Ports.
Type of signal that triggers an input or output event. For more information, see Activate a Stateflow Chart by Sending Input Events and Activate a Simulink Block by Sending Output Events.
Option for setting debugger breakpoints at the start or end of an event broadcast. Available breakpoints depend on the type of the event.
|Type of Event||Start of Broadcast||End of Broadcast|
|Input Event||Available||Not available|
|Output Event||Not available||Not available|
For more information, see Set Breakpoints to Debug Charts.
Description of the event. You can enter brief descriptions of events in the hierarchy.
Link to online documentation for the event. You can enter a web URL address or a MATLAB® command that displays documentation in a suitable online format, such as an HTML file or text in the MATLAB Command Window. When you click the Document link hyperlink, Stateflow displays the documentation.