Main Content

Set Properties for an Event

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:

    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 pane, edit the event properties.

  • To use the Model Explorer:

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

    2. In the Contents pane, select the event.

    3. In the Message pane, edit the event properties.

For more information, see Synchronize Model Components by Broadcasting Events.

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 Rules 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. You can enter brief descriptions of events in the hierarchy.

Document Link

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.

Related Topics