LabVIEW 2010 Statechart Module Help
»View Product Info
Complete the following steps to determine whether a state is active.
- Place the IsIn function on the block diagram of a guard or action.
- Click the Inputs cluster element, located on the left side of the block diagram, to display a list of cluster elements.
- Select the StatechartState element.
- Wire the StatechartState element to the Statechart States input of the IsIn function.
- Double-click the IsIn function to launch the Select State dialog box.
- Select the state that you want to check for activity.
- 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.