You are on page 1of 9

Name of the experiment

Study the features of LabVIEW and analyze the environment to exploit the software for further
complex and customized system design.

Overview
LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a system-design
platform and development environment from National Instruments.

The programming language used in LabVIEW, also referred to as G, is a dataflow
programming language. Execution is determined by the structure of a graphical block diagram (the
LabVIEW-source code) on which the programmer connects different function-nodes by drawing
wires. These wires propagate variables and any node can execute as soon as all its input data become
available.

LabVIEW ties the creation of user interfaces (called front panels) into the development cycle.
LabVIEW programs/subroutines are called virtual instruments (VIs). The front panel is built using
controls and indicators. Controls are inputs they allow a user to supply information to the VI.
Indicators are outputs they indicate, or display, the results based on the inputs given to the VI. The
back panel, which is a block diagram, contains the graphical source code. All of the objects placed on
the front panel will appear on the back panel as terminals.

LabVIEW also allows hardware interface with computer and by such interfacing we can effectively
program on hardware level.

In Labview,there are loop structures,case structures etc such as conventional programming
languages.But all these things can be implanted in LabVIEW in a very easy and convenient way.

Labview uses block diagram based approach instead of conventional programming language.It also
uses graphs,indicators etc to show the outputs of the experiments which are very useful in
engineering .

In our lab,we have done many experiments on Labview.These experiments include loop
structures,case structures,array,numerics etc.From these experiments,we present some experiments
below which cover almost all these categories with an experiment in each category.


Fig(1):Front Panel & Block Diagram of LabVIEW



1.Convert Celcius to Farenheit & Kelvin VI

In this case, a created VI that takes a number representing degrees Centigrade and converts it to a number
representing degrees Fahrenheit. The test depends on the basic formula-
C/5 = (F-32)/9
or, 9C/5 = F-32
or, 1.8C = F-32
or, F = 1.8C+32


Again,k=C+273


For Example, C = 4 degree centigrade then,
F = 1.8*45+32
=39.2


1. Open a new front panel by selecting the New VI button from the startup window. Double click on
Blank VI to open the window.
2. View the front panel and block diagram windows side by side by choosing Tile Left and Right from the
Window menu.
3. Now the front panel and block diagram are created.

For this test an input & output, a multiplier an adder and two constants ( one for 1.8 & another for 32)
icons are required. For this test, the front panel and block diagram are shown in figure (2).


Fig-(2): The Front panel and Block diagram of Conversion of degree centigrade into Farenheit & Kelvin





2.Calculate Square Root VI

In this case, a created VI that takes a numeric value greater than zero and it will give the squared root
value.

For example, If we put the numeric value 4, it will give the result 2.

1. Open a new front panel by selecting the New VI button from the startup window. Double click on
Blank VI to open the window.
2. View the front panel and block diagram windows side by side by choosing Tile Left and Right from the
Window menu.
3. Now the front panel and block diagram are created.
For this test, an input & output, a constant, a greater than equal, a case structure and a one button dialog
box icons are required. For this test, the front panel and block diagram are shown in figure (3).



Fig-(3):The Front panel and Block diagram of Calculating Square root.

3. .Series summation VI

In this case, a created VI that takes an array of first few natural numbers and it will give the sum.

For example, If we give array of first 10 nutural numbers,it will give 55 which can be verified by the
formula n(n+1)/2.Here,n=10 and sum=10*11/2=55.

1. Open a new front panel by selecting the New VI button from the startup window. Double click on
Blank VI to open the window.
2. View the front panel and block diagram windows side by side by choosing Tile Left and Right from the
Window menu.
3. Now the front panel and block diagram are created.
For this test,a for loop is required. The front panel and block diagram are shown in figure (4).


Fig-(4): Front panel and Block diagram of sum of series


4.Random signal generation VI

In this case ,a created VI generates array of random numbers between 0 and 1.

1. Open a new front panel by selecting the New VI button from the startup window. Double click on
Blank VI to open the window.
2. View the front panel and block diagram windows side by side by choosing Tile Left and Right from the
Window menu.
3. Now the front panel and block diagram are created.

For this test a while loop, timer, vertical toggle etc are required.As while loop is an infinite loop we have
used vertical toggle in order to exit the loop. The front panel and block diagram are shown in figure (5).


Fig-(5): Front panel and Block diagram of random signal generation


5.An array of random number generation

In this case,a created VI generates a 2D array of random numbers between 1 and 2.
1. Open a new front panel by selecting the New VI button from the startup window. Double click on
Blank VI to open the window.
2. View the front panel and block diagram windows side by side by choosing Tile Left and Right from the
Window menu.
3. Now the front panel and block diagram are created.

For this test two for loops are required.The inner for creates different column elements in a single row and
the outer for loop creates different rows.The front panel and block diagram are shown in figure (6).

Fig (6): Front panel and Block diagram of array random numbers
Appendix:

Case Structure
Owning Palette: Structures
Requires: Base Development System
Contains one or more subdiagrams, or cases, exactly one of which executes when the structure
executes. The value wired to the case selector determines which case to execute.
For Loop
Owning Palette: Structures
Requires: Base Development System
Executes its subdiagram n times, where n is the value wired to the count (N) terminal. The
iteration (i) terminal provides the current loop iteration count, which ranges from 0 to n-1.

While Loop
Owning Palette: Structures
Requires: Base Development System
Repeats the code within its subdiagram until a specific condition occurs. A While Loop always
executes at least one time.

Discussion:
We have done our experiments successfully as shown above.Appendix is taken from help menu of
LabVIEW in order to understand these structures.

You might also like