| Stateflow® | ![]() |
| On this page… |
|---|
Implicit events are built-in events that occur when a chart executes:
Chart waking up
Entry into a state
Exit from a state
Value assigned to an internal data object
These events are implicit because you do not define or trigger them explicitly. Implicit events are children of the chart in which they occur and are visible only in the parent chart.
To reference implicit events, action statements use this syntax:
event(object)
where event is the name of the implicit event and object is the state or data in which the event occurs.
Each keyword below generates implicit events in the action language notation for states and transitions.
Implicit Event | Meaning |
|---|---|
Specifies and implicitly generates a local event when Stateflow® software writes a value to the variable data_name. | |
Specifies and implicitly generates a local event when the specified state_name is entered. | |
Specifies and implicitly generates a local event when the specified state_name is exited. | |
Specifies and implicitly generates a local event when the chart of the action being evaluated awakens. | |
Same as the tick keyword. |
If more than one object has the same name, the event reference must qualify the name of the object with the name of its ancestor. These examples are valid references to implicit events:
enter(switch_on) en(switch_on) change(engine.rpm)
Note The tick (or wakeup) event refers to the chart containing the action being evaluated. The event cannot refer to a different chart by argument. |
This example illustrates use of implicit tick events.

Fan and Heater are parallel (AND) superstates. The first time that an event awakens the Stateflow chart, the states Fan.Off and Heater.Off become active.
Assume that you are running a discrete-time simulation. Each time that the chart awakens, a tick event broadcast occurs. After four broadcasts, the transition from Fan.Off to Fan.On occurs. Similarly, after three broadcasts, the transition from Heater.Off to Heater.On occurs.
For information about the after operator, see Using Temporal Logic in State Actions and Transitions.
![]() | Sharing Events with Stateflow® External Code | Counting Events | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |