SubVI

From LabVIEW Wiki
Jump to: navigation, search

SubVIs are VIs that are called from another VI. This is accomplished by:

  1. Connecting controls and indicators to a VI's Connector Pane
  2. Dropping that VI on a Block Diagram of another VI
  3. Attaching Wires to its inputs and outputs

There is no difference between a VI and a SubVI except the relationship in Calling Heirarchy.

Usage

SubVIs work as functions on textual programming languages. Instead of having the same code writing in many parts of the code, we put it in VI's so it can be called every time we need.

SubVIs.png

Best Practices

Create a VI description at VI Properties -> Documentation. The description appears in the Context Help when you hover on the VI in the block diagram.

Context help.png

For more Best Practices for SubVIs use, look at Icon Editor and Connector Pane pages.