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 Statechart State 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.