Configure State Dialog Box

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

Requires: Statechart Module

Access this dialog box by right-clicking the border of a state and selecting Configure State from the shortcut menu.

Use this dialog box to define the entry action, exit action, and static reactions of a state.

When you configure a state, a wrench icon appears on the state () in the Statechart Editor window.

The states you are configuring change color in the Statechart Editor window. The default color is yellow. You also can customize the color of the states you are configuring.

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.

This dialog box includes the following pages and components:

  • Label—Specifies the name of the state. You can display this name on the statechart diagram by right-clicking the state border and selecting Visible Items»Label from the shortcut menu.
  • Jump to State—Highlights the state to which the Configure State dialog box corresponds on the statechart diagram.
  • Code Status—Displays a green checkmark if the Guard or Action code does not contain any errors. If LabVIEW detects an error in the code, this indicator updates to display a red X. Click this X to display the errors.
  • Reactions—Displays the Entry Action and Exit Action of the state. This list also displays any static reactions you create.

    Note  Statecharts execute entry and exit actions upon entering or exiting the state. Therefore, LabVIEW disables the Triggers/Groups and Guard pages when you select the Entry Action or Exit Action item.
    • Create—Creates a static reaction for the state.
    • Delete—Deletes the selected static reaction from the Reactions list. You cannot delete the Entry Action or Exit Action items.
  • Triggers/Groups—Use this page to specify a trigger or group of triggers that causes the statechart to begin evaluating this transition or static reaction. You can choose from triggers and groups that you have created.
    Note  Consider using the NULL trigger for transitions and static reactions in synchronous statecharts.
    • Edit Triggers and Groups—Launches the Edit Triggers and Groups dialog box, which you use to create and manage triggers and groups.
    • Select All Triggers—Specifies that any trigger in the Triggers list causes the statechart to begin evaluating this transition or static reaction.
    • Deselect All Triggers—Specifies that any trigger in the Triggers list causes the statechart to begin evaluating this transition or static reaction. After you click this button, the transition or static reaction automatically reacts to any new triggers you create.
  • Guard—Use this page to write LabVIEW block diagram code that comprises the guard of the transition or static reaction. The statechart evaluates this guard after detecting a trigger or group you specify on the Triggers/Groups page. Defining a guard is optional.

    The block diagram on this page is similar to a traditional LabVIEW block diagram. For example, you can access the Functions palette, call subVIs, and use probes. National Instruments recommends using subVIs to save space on this block diagram.

    You cannot access the front panel window for this block diagram, which means you cannot use front panel controls or indicators. To specify the value of a VI parameter, use a block diagram constant or input or state data.

    The left side of the block diagram contains two cluster elements. Click a cluster element to access a specific input, output, or state of the statechart. You can resize the cluster elements to access multiple elements simultaneously.
    Note  The Inputs cluster contains a special element, Inputs»StatechartState»All Elements, which you use with the IsIn function.


    The right side of the block diagram contains the Execute? Boolean control. The guard code must send a TRUE or FALSE value to this Boolean control. If the guard code sends a TRUE value, LabVIEW executes any Action code associated with this transition or static reaction. If the guard code sends a FALSE value, LabVIEW does not execute any action code.
    • Disable?—Prevents the statechart from executing the code on this block diagram. Place a checkmark in this checkbox to disable this code without erasing the code. Remove the checkmark from this checkbox to enable the code again.
  • Action—Use this page to write block diagram code that describes any actions to take if the Guard evaluates to TRUE. You use this block diagram in the same way that you use the block diagram on the Guard page. Defining an action is optional.
    Note  The Outputs cluster contains a special element, Outputs»InternalQueue»All Elements, which you use with the Send Internal Trigger function.

    This page has an additional cluster element on the right side of the block diagram. You use this cluster element to modify statechart output and/or state data.

    • Disable?—Prevents the statechart from executing the code on this block diagram. Place a checkmark in this checkbox to disable this code without erasing the code. Remove the checkmark from this checkbox to enable the code again.
  • Properties—Use this page to edit the name and description of the item you are modifying. This description is for documentation purposes only and does not affect the execution of the statechart.
    • Reaction Name—Specifies the name of the static reaction. LabVIEW disables this option when you select either the Entry Action or Exit Action item.
    • Description—Specifies a description of the transition, static reaction, entry action, or exit action.

WAS THIS ARTICLE HELPFUL?

Not Helpful