Main Content

Set Properties for an Event

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 modify event properties in the Property Inspector or the Model Explorer.

To use the Property Inspector:

  1. In the Modeling tab, under Design Data, select Symbols Pane and Property Inspector.

  2. In the Symbols pane, select the event.

  3. In the Property Inspector, edit the event properties.

To use the Model Explorer:

  1. In the Modeling tab, under Design Data, select Model Explorer.

  2. In the Model Hierarchy pane, select the parent of the event.

  3. In the Contents pane, select the event.

  4. In the Dialog pane, edit the event properties.

You can also modify these properties programmatically by using Stateflow.Event objects. For more information about the Stateflow programmatic interface, see Overview of the Stateflow API.

Stateflow Event Properties

Name

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

Scope of the event. The scope specifies where the event occurs relative to the parent object.

ScopeDescription
LocalEvent 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.
Input from SimulinkEvent 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.
Output to SimulinkEvent 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.

Port

Index of the port associated with the event. This property applies only to input and output events.

Trigger

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.

Debugger Breakpoints

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 EventStart of BroadcastEnd of Broadcast
Local EventAvailableAvailable
Input EventAvailableNot available
Output EventNot availableNot available

For more information, see Set Breakpoints to Debug Charts.

Description

Description of the event.

Document Link

Link to online documentation for the event. You can enter a web URL address or a MATLAB® command that displays documentation as an HTML file or as text in the MATLAB Command Window. When you click the Document link hyperlink, Stateflow displays the documentation.

See Also

Objects

Tools

Related Topics