Stateflow    

At Operator

Syntax

at(n, E)

where E is the base event for the at operator and n is any expression that evaluates to an integer value.

Semantics

The at operator is true only at the nth occurrence of the base event E since activation of the associated state.

Usage

The following example illustrate use of the at operator in a transition expression.

This expression permits a transition out of the associated state only if a ROTATION event occurs exactly 10 CLK cycles after activation of the state.

The next example illustrates usage of a before event in a state's during action.

This example causes the Heater_on state to display a status message 10 CLK cycles after activation of the associated state.


 Before Operator Every Operator