Stateflow | ![]() ![]() |
before Temporal Logic Operator
The before operator has the following syntax:
where E
is the base event for the before
operator and n
is one of the following:
The before
operator is true if the base event E
has occurred less than n
times since activation of its associated state. Otherwise, it is false. In a chart with no input events, before(n,wakeup)
or before(n,tick)
evaluates to true before the chart has woken up n
times.
The following example illustrates the use of the before
operator in a transition expression.
This expression permits a transition out of the associated state only on occurrence of a ROTATION
event but no later than 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 increment the temp
variable once per CLK
cycle until the MAX_ON_TIME
limit is reached.
![]() | after Temporal Logic Operator | at Temporal Logic Operator | ![]() |