Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Determining Whether a State is Active (Statechart Module)

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

Complete the following steps to determine whether a state is active.

  1. Place the IsIn function on the block diagram of a guard or action.  

  2. Click the Inputs cluster element, located on the left side of the block diagram, to display a list of cluster elements.
  3. Select the StatechartState element.
  4. Wire the StatechartState element to the Statechart States input of the IsIn function.
  5. Double-click the IsIn function to launch the Select State dialog box.
  6. Select the state that you want to check for activity.
  7. Click the OK button to save changes and return to the block diagram.

The guard or action code now resembles the following figure:

The IsIn? Boolean indicator of this function returns TRUE if the specified state is active. This Boolean returns FALSE if the specified state is not active.

Note  You can configure the icon of the IsIn function to display the name of the state or the path to the state that the function checks. Right-click the IsIn function and select Icon Style»Configuration»State Name to display the name of the state. Select Icon Style»Configuration»State Path to display the path to the state.

You also can configure the Run Statechart function to display the current active state in the caller VI.


 

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