Executing Statechart Iterations (Statechart Module)

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

The first iteration of the statechart executes the following two steps:

  1. Takes the transition to the state that the top-level Initial pseudostate specifies.
  2. Executes any entry action of this first state and any specified substates.
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.

  1. Reacts to this trigger.
  2. Checks the internal trigger queue.
  3. Reacts to any triggers in this queue.
  4. Checks the internal trigger queue again.

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.

WAS THIS ARTICLE HELPFUL?

Not Helpful