LabVIEW 2010 Statechart Module Help
»View Product Info
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.
Create a new statechart or open an existing .lvsc file.
- Display the Project Explorer window associated with this statechart.
- 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.
- 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.
- Double-click the String label and enter SC Example as the new label.
- (Optional) Enter a default value in the SC Example text box. For example, you can enter Hello World in this string control.
- 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.