Jump to content

SubVI: Difference between revisions

From LabVIEW Wiki
Started page
 
Ederson (talk | contribs)
No edit summary
Line 4: Line 4:
# Attaching [[Wire]]s to its inputs and outputs   
# Attaching [[Wire]]s to its inputs and outputs   
There is no difference between a [[VI]] and a SubVI except the relationship in [[Calling Heirarchy]].
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.
[[File: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.
[[File:Context help.png]]
For more '''Best Practices''' for '''SubVIs''' use, look at [[Icon Editor]] and [[Connector Pane]] pages.


[[Category:Node]]
[[Category:Node]]

Revision as of 19:08, 5 August 2023

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.

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.

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