Configuring a State (Statechart Module)
- Updated2023-02-21
- 2 minute(s) read
Complete the following steps to configure a state.
- Right-click the border of a state and select Configure State to launch the Configure State dialog box.
Note You can open multiple Configure State and Configure Transition dialog boxes simultaneously. If you do so, you may not otherwise edit the statechart diagram until you close all configuration dialog boxes. When you configure a state, a wrench icon appears on the state ( ) in the Statechart Editor window. The state also changes color. You can customize the configuration color for states. The default configuration color is yellow.
- The Reactions list on the left side of this dialog box contains the state actions you can configure. To define the entry or exit action, select the appropriate action from the Reactions list.
To configure a static reaction, first click the Create button to create a new static reaction. This new static reaction appears as StaticRxn0, and LabVIEW selects this static reaction automatically. - Use the tabs on the right side of this dialog box to define the trigger(s), guard, and action associated with the action you chose from the Reactions list. You configure these elements by writing LabVIEW block diagram code.
Note You cannot define triggers or guards for entry or exit actions. Therefore, LabVIEW disables the Triggers/Groups and Guard pages when you select either the Entry Action or Exit Action item. - Click the OK button to save changes and return to the statechart diagram.
To remove a static reaction, select that reaction from the Reactions list and then click the Delete button. You cannot delete entry or exit actions. However, you can disable the LabVIEW code that comprises these actions. Place a checkmark in the Disable? checkbox on the Action page to disable the LabVIEW code that comprises these actions. You also can disable the guard and/or action of a static reaction.
You also can configure a state by specifying the priority of the transitions that exit the state.