Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Statechart Instancing (Statechart Module)

LabVIEW Statechart Module 1.0 Help
August 2007

NI Part Number:
372103A-01

»View Product Info

Each Run Statechart function represents a separate copy, or instance, of a statechart. Because this function is reentrant, you can call multiple statechart instances simultaneously. You can call multiple instances of both asynchronous and synchronous statecharts.

The following figure shows a single caller VI that calls two instances of the same asynchronous statechart.

In the previous figure, notice how the caller VI contains two instances of the Run Statechart function. Each instance has a unique Instance Name, which separates the external trigger queues from one another. When you click the Button front panel control, the Send External Trigger 1 function sends Trigger1 to Statechart 1 while the Send External Trigger 2 function sends Trigger2 to Statechart 2. Also notice that both instances read the same input data but write to different output data.

Note  This example uses the caller VI to send triggers to an external queue. However, as long as the caller VI is running and the statechart is in memory, you can use any VI to send triggers to an external queue. This behavior means that you can place the Trigger Loop and Statechart Loop in separate VIs.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit