LabVIEW Statechart Module

Table of Contents

Displaying Statechart Diagrams on the Front Panel of a Caller VI (Statechart Module)

  • Updated2023-02-21
  • 3 minute(s) read

You can display statechart diagrams on the front panel of a caller VI. The Statechart Diagram Display option of the Configure Statechart Run Node dialog box specifies the number of statechart diagrams to display on the front panel of the caller VI in a Diagram Display picture control. Right-click a Run Statechart function and select Configure from the shortcut menu to display the Configure Statechart Run Node dialog box. You also can double-click the Run Statechart function to display the Configure Statechart Run Node dialog box.

You can choose to display one statechart diagram, n statechart diagrams, or all statechart diagrams. You can display multiple diagrams only if the statechart diagram contains superstates that you view as a subdiagram. The front panel of the caller VI displays the contents of the superstate.

Complete the following steps to display one statechart diagram on the front panel of a caller VI.

  1. Open a caller VI that contains a Run Statechart function that links to a statechart.
  2. Press the <Ctrl-E> keys to display the block diagram of the caller VI.
  3. Locate the Run Statechart function .
  4. Right-click the Run Statechart function and select Configure from the shortcut menu to display the Configure Statechart Run Node dialog box.
    Note  You also can display the Configure Statechart Run Node dialog box by double-clicking the Run Statechart function.
  5. Place a checkmark in the Show Terminal? checkbox next to the Statechart Diagram Display option. The Statechart Diagram Display option specifies to display a statechart diagram(s) in a Diagram Display picture control on the front panel of the caller VI. You can choose to display one statechart diagram, n statechart diagrams, or all statechart diagrams.
  6. Select Display one diagram from the Statechart Diagram Display pull-down menu. Selecting Display one diagram adds a Diagram Display Index input and a Diagram Display output to the Run Statechart function.
  7. Click the OK button to apply the changes to the Run Statechart function and close the Configure Statechart Run Node dialog box.
  8. Right-click the Diagram Display Index input of the Run Statechart function and select Create»Control from the shortcut menu. The Diagram Display Index control specifies which statechart diagram the front panel of the caller VI displays.
  9. Right-click the Diagram Display output of the Run Statechart function and select Create»Indicator from the shortcut menu. The Diagram Display indicator displays the statechart diagram on the front panel of the caller VI.
  10. Press the <Ctrl-E> keys to display the front panel of the caller VI. Notice the Diagram Display Index control and the Diagram Display indicator on the front panel.
  11. (Optional) Specify the number of the statechart diagram in the Diagram Display Index that you want the Diagram Display indicator to display. LabVIEW assigns the top-level statechart diagram a value of 0. LabVIEW assigns increasing values in increments of one to all superstates in the statechart diagram in a random order. The default value for the Diagram Display Index is 0.
  12. Run the caller VI once to display the statechart diagram in the Diagram Display indicator.
  13. Resize the Diagram Display indicator as necessary to view the entire statechart diagram.

The statechart diagram display shows the statechart when you run the caller VI. The statechart diagram display also highlights the states that are active at the end of each iteration of the statechart.

Log in to get a better experience