| Stateflow® | ![]() |
| On this page… |
|---|
Use the Event properties dialog to set and modify properties of an event, which can vary according to the scope of the event. The Event properties dialog displays only the property fields that are relevant for the event you are configuring. For example, the dialog displays these properties and default values for an event whose scope is Local.

For input and output events, the dialog displays these properties and defaults.

To access the Event properties dialog, use one of these methods:
Add a new event from the Stateflow® Editor.
The Event properties dialog opens on your desktop, as described in Adding Events Using the Stateflow® Editor.
Open the Event properties dialog in the Model Explorer using one of these techniques:
Double-click the event in the Contents pane.
Right-click the event in the Contents pane and select Properties.
Select the event in the Contents pane and then select View > Dialog View.
The Event properties dialog opens inside the Model Explorer.
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.
Scope of the event. The scope specifies where the event occurs relative to its parent. You can choose one of these scopes:
| Scope | Description |
|---|---|
| Local | Event that can occur anywhere in a Stateflow machine, but is visible only in its parent object (and its parent's descendants). |
| Input from Simulink | Event that occurs in a Simulink® block, but is broadcast in a Stateflow chart. See Defining Input Events. |
| Output to Simulink | Event that occurs in a Stateflow chart, but is broadcast in a Simulink block. See Defining Output Events. |
| Exported | Event that can be broadcast by external code built into a standalone or code generation target. You can define exported events only for a Stateflow machine. See Exporting Events to Stateflow® External Code. |
| Imported | Externally defined event that can be broadcast anywhere within the hierarchy of a Stateflow machine. You can define imported events only for a Stateflow machine. See Importing Events from Stateflow® External Code. |
Property that applies to input and output events.
For input events, port is the index of the input signal that triggers the event.
For output events, port is the index of the signal that outputs this event.
You assign input and output events to ports in the order in which you add the events. For example, you assign the first input event to input port 1 and the third output event to output port 3.
You can change port assignments in the Model Explorer or the Event properties dialog. When you change the number of one port, the numbers of other ports adjust automatically to preserve the relative order. See Associating Input Events with Control Signals and Associating an Output Event with an Output Port.
Type of signal that triggers an input or output event. See Defining Input Events or Defining Output Events.
Option for setting debugger breakpoints at the start or end of an event broadcast.
Description of this event. You can enter brief descriptions of events in the hierarchy.
Link to online documentation for events in a Stateflow chart. To document a particular event, set the Document Link property to a Web URL address or MATLAB® expression that displays documentation in a suitable online format (for example, an HTML file or text in the MATLAB Command Window). When you click the blue Document Link text, the chart evaluates the expression.
![]() | Adding Events | Sharing Events with Simulink® Blocks | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |