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

Designing Source VIs

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

The source VI of an Express VI contains the underlying code for the Express VI. The source VI serves as a wrapper around a subVI that determines how the Express VI behaves. The source VI also determines the connector pane and icon of the Express VI. After you create a new Express VI with the Express VI Creator wizard, build the source VI to specify how the Express VI behaves and to design the connector pane and icon.

Building the Source VI Front Panel

Build the front panel of the source VI to include all objects needed to pass information to the subVI. This front panel is not exposed to the user. If you created the Express VI from an existing VI, the front panel of the source VI contains all the controls and indicators from the original VI that you set as expandable. If you created the Express VI from another Express VI, the front panel of the source VI is identical to that of the original Express VI. If you created the Express VI from a blank VI, the front panel of the source VI is blank, and you must build it from scratch.

The following list describes some recommendations to consider when building the front panel of the source VI for an Express VI.

  • Use only controls and indicators that exist on the Controls palette. If a user right-clicks an Express VI terminal and selects Create┬╗Control/Indicator from the shortcut menu, LabVIEW creates a copy of the control/indicator on the front panel of the Express source VI.
  • Use a 1D array of waveforms for multivalue inputs. For multivalue outputs, use a waveform graph. Otherwise, use a numeric control for scalar values, an LED control for Boolean values, and a string control for strings. Do not modify the controls and indicators.

Building the Source VI Block Diagram

After creating the front panel for the source VI, you can modify the block diagram to specify how the Express VI behaves. If you created the Express VI from an existing VI, the block diagram of the source VI contains a subVI identical to the original VI. If you created the Express VI from another Express VI, the block diagram of the source VI is identical to that of the original Express VI. If you created the Express VI from a blank VI, the block diagram of the source VI contains a template subVI. Build the subVI to perform all the intended functionality of the Express VI, and design the connector pane and a unique icon for the subVI. The connector pane must include all the inputs and outputs you want to configure programmatically through the Express VI.

The following list describes some recommendations to consider when building the subVI for an Express VI.

  • If you are creating an Express VI that contains several memory-intensive subVIs that do not enable simultaneously, call them by reference. However, if you include the Express VI in an executable application created with the LabVIEW Application Builder, you must manually add the subVIs called by reference to the build.
  • You can include objects that are not part of the core LabVIEW development environment, such as LabVIEW module or toolkit VIs, drivers, or other software. However, Express VIs that include these objects can run only on computers on which those objects are present.

The block diagram of the source VI must include a control or constant for each configurable or expandable parameter in the Express VI. If a parameter is both configurable and expandable, or if a parameter is expandable but not configurable, the block diagram of the source VI must contain a corresponding control or indicator for that parameter. If a parameter is configurable but not expandable, the block diagram of the source VI must contain a corresponding constant for that parameter.

Designing the Express VI Connector Pane and Icon

After building the front panel and block diagram of the source VI, design the connector pane and a unique icon for the source VI. You must include all expandable terminals on the connector pane of the source VI. You do not need to include configurable parameters on the connector pane. The connector pane and icon of the source VI correspond to the connector pane and icon of the Express VI.


 

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