Stateflow | ![]() ![]() |
every Temporal Logic Operator
The syntax for the every
operator is as follows:
where E
is the base event for the every
operator and n
is one of the following:
The every
operator is true at every n
th occurrence of the base event E
since activation of its associated state. Otherwise, it is false. In a chart with no input events, every(n,wakeup)
(or every(n,tick)
) evaluates to true whenever the chart wakes up an integer multiple n
times.
Note
The every operator resets its counter for E to 0 each time the associated state is activated. As a result, this operator is useful only in state during actions.
|
The following example illustrates the use of the every
operator in a state.
This example causes the Heater_on
state to display a status message every 10 CLK
cycles after activation of the associated state.
![]() | at Temporal Logic Operator | Conditional and Event Notation | ![]() |