Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

How to Create SubVI in labview

Description: Sub VIs are very useful in LabVIEW.
Using Sub VI helps you manage changes and debug the Block Diagram quickly.

You can also easily reuse your code. SubVIs are equal to functions in text based languages.
Requirements: LabVIEW any version latest than 2009
The Procedure is as follows: Create a SubVI that performs a linear scaling . Where are inputs, and is an output.
Step 1: Create a New VI (File->New VI) (Blank VI)
Step 2: Give the VI a Name (Linear Scaling.vi)
Step 3: Create your Front Panel with your necessary Controls and Indicators

subVI labview fig1

Step 4:
Create your Block Diagram. The Block Diagram could look something like this:

subVI labview fig2

Step 5: Create the Input and Output Connectors. Right-click on the little icon in the upper right corner and select 'Show Connector'.

➨Select the Wire tool and click on the wanted connector, then click on the Control or Indicator on the Front Panel you want to connect to this connector.

subVI labview fig3

Step 6:
Create an Icon using the Icon Editor. Right-click on the little icon in the upper right corner and select 'Edit Icon'.

subVI labview fig4

Step 7:
Create a new VI that you use to test your Sub VI. Example:

subVI labview fig5

Download Labview Source code of this subVI example

Download linear equation subVI file
Download Main labview VI file

Similar posts on Labview programming

Labview data types
Creating SubVI
Creating Array and Array operations
Cluster concepts in labview
Various plots in labview
File I/Os
For loop,while loop and case structure
Local variable vs Global variable concepts

Useful Links to Labview Source codes

Refer following as well as links mentioned on left side panel for useful labview source codes.

Hex to Binary labview VI      Decimal to Binary labview VI
Number Generator labview VI      Binary to Decimal labview VI
Binary number generator     modulator-demodulator
FFT     up and down sample

Cellular Telecommunications Tutorials -
RF Wireless World

WLAN  802.11ac  802.11ad  wimax  Zigbee  z-wave  GSM  LTE  UMTS  Bluetooth  UWB  IoT  satellite  Antenna  RADAR