Skip to content

Event-driven vs. cycle-based execution

The state machine can define one of two different execution schemes:

  • In the cycle-based execution scheme, a run-to-completion step is executed periodically in regular time intervals.
  • In the event-driven execution scheme, a run-to-completion step is executed each time an event is raised.

The execution scheme is selected in the definition section by either using the @CycleBased or @EventDriven annotation. If nothing is specified, the cycle-based execution scheme with a time interval of 200 milliseconds is used for simulation. For a better understanding, see also this example, or the more elaborate explanation in the language reference.