Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Defining Data Types for a Statechart (Statechart Module)

LabVIEW 2010 Statechart Module Help

Edition Date: June 2013

Part Number: 372103F-01

»View Product Info
Download Help (Windows Only)

You use the caller VI to send input, output, and state data to the statechart. Before sending this data, you must define the types of data the caller VI can send to the statechart and receive from the statechart. The following example shows how to define output data.

  1. Create a new statechart or open an existing .lvsc file.
  2. Display the Project Explorer window associated with this statechart.
  3. Double-click the Outputs.ctl item to open the Outputs type definition. This type definition consists of a cluster that can contain elements of multiple data types. By default, this cluster contains a single numeric control labeled Numeric.
  4. Right-click this control and select Replace»Express»Text Controls»String Control from the shortcut menu to replace the numeric control with a string control.
  5. Double-click the String label and enter SC Example as the new label.
  6. (Optional) Enter a default value in the SC Example text box. For example, you can enter Hello World in this string control.
  7. Press the <Ctrl-S> keys to save the type definition, and close the window.
Note  The previous steps used a string control to represent data. You can place controls and indicators of any data type in any of the three type definitions.

This process is identical for modifying input and state data, except for step 1 in which you double-click either the Inputs.ctl or StateData.ctl type definition.

Now that you have defined an output data type, the SC Example string appears as a cluster element of the Outputs cluster when you configure a transition or static reaction.


 

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