Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

Labview programming basics Tutorial

This Labview programming language tutorial covers Labview basics,data type supported in labview and example implementation using labview. This labview tutorial covers following topics:
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


Labview is the programming language developed by National Instruments (NI). It is widely used in test and measurement industry for various applications such as automation, conformance testing, pre-certification testing and more. It is adopted by industry in various discipline including wireless, telecom, mechanical and electrical domains. National Instrument provides training on Labview at various levels. Various labview certification courses will be available from National Instruments. This labview tutorial covers very basic knowledge on labview programming for beginners. Programs developed under labview environment are named as VI. VI stands for Virtual Instrumentation.

Creating VI:

After installing labview and clicking and opening blank VI following two windows open up.

1. Front panel - It provides user interface functionalities of the design under development using labview. Basically it provides place where one can keep controls and indicators mainly used to provide inputs and take outputs from the VI. This also helps interface Vis together in the bigger system by connecting outputs of one VI with the inputs of the other VI.

2. Block Diagram -This window contains source code in the form of graphical icons and wires/signals.

In addition there is icon and connector pane which helps use VI as sub VI in a larger bigger system. For Example as mentioned below scrambler is used as sub VI in a transmitter of a wimax physical layer. This is similar to subroutine or function as used in text based programming languages (Pascal, c).

Icon of each VI is visible on the top right corner of both the block diagram and front panel windows. One can edit the icon only in front panel window. Each icon contains text, image and both for function representative purpose.

Use Edit Icon to add text and graphics and colors.

Use Show connector feature to add and remove terminal to the icon (i.e. VI). These terminals acts as an input and output terminals and will hence help pass arguments to the VI and take out the arguments from a VI.

Data types supported in Labview

Labview provides colors, styles, and thicknesses depending on data types used as shown in the figures below, so that they can be easily identified by the Labview programmer and help connect appropriate wires between the two VIs.

labview programming tutorial data type
Figure 1 of data type supported in labview

Programming Syntax

Similar to other programming language labview also provides functions for For Loop, While Loop, case structure, Shift register, Array, File I/O, Case Structure, graphs and more. It provides various string related functions. Various functionalities specific to particular domain such as signal processing are also available and provided in labview programming language. One can drag and drop the icon in the block diagram panel and use right click of mouse and help to go in detail of each of the functions. This helps in speed up of programming development.

Example Implementation using Labview

In this section we will see example implementation of scrambler module as mentioned below in the circuit; it takes input seed and data as input and provides scrambled data as output.

scrambler circuit

Implementation of the above scrambler circuit module as per labview programming constructs is depicted below.

scrambler example implementation using labview
Figure 2 Scrambler example implementation using labview

Input data:

Input Seed: 3825

Output data:
92530732C0 6248F0 1922E0 91621AC1

Interfacing with RFSG and RFSA using drivers

Labview provides driver VIs to interface offline VIs with the RF Vector Signal Generators and RF Vector Signal Analyzers. This makes design convert into real time or online use applications.

Related Links

•   What is Labview
•   National Instruments Labview
•   Download Labview, http://www.ni.com/downloads/products/

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 

Share this page

Translate this page