Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Run Statechart Function

LabVIEW 8.6 Statechart Module Help
June 2008

NI Part Number:
372103B-01

»View Product Info

Owning Palette: Statechart Communication Functions

Installed With: Statechart Module

Executes an instance of the linked statechart. You typically place this function inside a loop in the caller VI.

The parameters of this function depend on whether you configured the statechart to be synchronous or asynchronous. You configure the statechart by using the Statechart Code Generation page of the Project Library Properties dialog box.

You must link this function to a statechart before configuring the parameters. To link this function to a statechart, right-click this function and select Link to Statechart. You also can double-click the function. You must link to a statechart for which you have generated LabVIEW code.

Tip  Instead of dragging this function from the palette to the block diagram of the caller VI, you can drag the .lvsc file from the Project Explorer window onto a block diagram. This action creates a Run Statechart function that is linked to the statechart.

You can configure the icon style of this function to display the custom icon of the statechart diagram, the statechart to which this function links, and/or the trigger that this function sends to the linked statechart.

Details  

Use the pull-down menu to select an instance of this VI.

Run Statechart (Synchronous)

Trigger specifies the trigger to send to the statechart. To specify a trigger, right-click this input terminal and select Create»Control or Create»Constant. This action creates an enumerated type control/constant that contains the list of available triggers.You can send only triggers that you create by using the Edit Triggers and Groups dialog box.The default value is NULL.
Inputs specifies the input data to the statechart. You define the type of input data by editing the Inputs.ctl type definition of the .lvsc file.
Init? is TRUE if you want to restart the statechart from any initial conditions you provide. Init? is FALSE if you do not want to restart the statechart. The default value is FALSE.
Outputs returns the output data from the statechart. You define the type of data by editing the Outputs.ctl type definition of the .lvsc file.
Terminated? returns TRUE after the top-level statechart enters the Terminal pseudostate, that is, after the entire statechart finishes executing. Terminated? returns FALSE at all other times.

Run Statechart (Asynchronous)

Instance Name specifies the instance of the statechart to which this function sends triggers. The value of this parameter must match the value of the Instance Name parameter of the Run Statechart function to which you want to send triggers.
Inputs specifies the input data to the statechart. You define the type of input data by editing the Inputs.ctl type definition of the .lvsc file.
Init? is TRUE if you want to restart the statechart from any initial conditions you provide. Init? is FALSE if you do not want to restart the statechart. The default value is FALSE.
Outputs returns the output data from the statechart. You define the type of data by editing the Outputs.ctl type definition of the .lvsc file.
Terminated? returns TRUE after the top-level statechart enters the Terminal pseudostate, that is, after the entire statechart finishes executing. Terminated? returns FALSE at all other times.

Run Statechart Details

You can configure this function to display the name of the current active state and to display current active states for diagrams. Right-click this function and select Configure from the shortcut menu to display the Configure dialog box.

The Statechart Active States option specifies to display the name of the current active state. Place a checkmark in the Show Terminal? checkbox and click the OK button to close the Configure dialog box. The Run Statechart function has a new Active States output that returns the name of the current active state.

The Statechart Diagram Display option specifies to display current active states for diagrams. Place a checkmark in the Show Terminal? checkbox to enable this option. You can choose to display current active states for one diagram, N diagrams, or all diagrams.

  • Display one diagram—(Default) Displays current active states for one diagram. Selecting Display one diagram adds a Diagram Display Index input and a Diagram Display output to this function. Diagram Display Index specifies the diagram for which you want to display current active states. The default value is 0, which specifies to display current active states for the top-level statechart diagram. Other values specify to display current active states for subdiagrams. Diagram Display displays current active states for the specified diagram.
  • Display diagrams—Displays current active states for multiple diagrams. Selecting Display diagrams adds a Diagram Display Index Array input and a Diagram Display Array output to this function. Diagram Display Index Array specifies the diagrams for which you want to display current active states. Diagram Display Array displays current active states for the specified diagrams.
  • Display all diagrams—Displays current active states for all the diagrams. Selecting Display all diagrams adds a Diagram Display Array to this function. Diagram Display Array displays current active states for all the diagrams.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit