The first iteration of the statechart executes the following two steps:
|Note During the initial iteration, the statechart ignores incoming triggers.|
After completing these steps, the statechart is in the first state. What happens next depends on whether the statechart is asynchronous or synchronous. Synchronous statecharts begin an iteration according to the flow of data through the Run Statechart function. Asynchronous statecharts begin an iteration after receiving a trigger from the external trigger queue.
In either situation, the statechart completes the following steps upon receiving a trigger.
The iteration finishes after the internal trigger queue is empty. After the iteration finishes, the statechart returns output data to the caller VI.
|Note You can configure a statechart to either reset or cache this output data.|
The following figure shows a full iteration of an asynchronous statechart. This iteration is the same for synchronous statecharts except that synchronous statecharts do not receive triggers from an external queue.
The following figures show detailed views of processes A, B, and C in the previous figure. Items 1, 2, and 3 are results of these processes.
* The statechart checks outgoing transitions according to the priority you specify for each transition. Also, this step does not occur for transitions that leave an Initial pseudostate. Statecharts take these initial transitions unconditionally. The statechart checks static reactions according to the order in which you define these reactions.
|Note Substates in orthogonal regions execute concurrently during the same iteration.|