Stateflow    

at Temporal Logic Operator

The syntax for the at operator is as follows:

where E is the base event for the at operator and n is one of the following:

The at operator is true only at the nth occurrence of the base event E since activation of its associated state. Otherwise, it is false. In a chart with no input events, at(n,wakeup) (or at(n,tick)) evaluates to true when the chart wakes up for the nth time.

The following example illustrates the 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 an at 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 Temporal Logic Operator every Temporal Logic Operator