






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







LAB# 05 Introduction to LAbView
Lab Assessment
Pre Lab
In Lab
Critical Analysis
LAB# 05 Introduction to LabVIEW
This lab introduces LabVIEW software. Familiarise the students with the following concepts:
Basic Introduction to LabVIEW
graphical programming language that uses icons instead of lines of text to
create applications.
hardware control–a typical instrument configuration based on Labview.
Figure 1.
A VI consists of
User interface to the code (as shown in figure 1.2)
➢ Controls (Input): Boolean controls, Numerical controls, etc.
➢ Indicators (Output): Graphs, Charts, Numerical indicators, etc.
Figure 1.
The components of a block diagram belong to one of the three classes:
➢ Nodes: Program execution elements.
➢ Terminals: Ports through which data passes between the block diagram and the front
panel, and between nodes. Terminal is any point to which you can attached a wire to
pass data.
➢ Wires : Data paths between terminals.
There are three nodes types: Functions, subVI nodes, and structure.
➢ Functions are the build-in nodes such as adding number, file I/O.
➢ SubVI nodes VIs that you design and later call from another VI.
➢ Structures control the grogram flow, such as For Loops and while Loops.
It consists of many sub-palettes that can be used to create front panels.
➢ Control: Controls simulate input devices (such as knobs, push button and dials) and provide a
pipeline to move data to the Black Diagram.
➢ Indicator: Controls simulate out devices to display the output result (in chart, graph…).
Controls Palette is available at View pull-down menu in the Front Panel.
The Functions Palette consists of many sub-palette that contain almost all available objects that
can be used to create the block diagram. It contains functions as well as many VIs or Sub-VIs
that ship with LabVIEW. Function Palette is available at View menu in the Block Diagram
Window.
LabVIEW (like C or Matlab) supports the following structures:
➢ If / Else
➢ For loop
➢ While loop
These can be found in ‘Structures’ in the Programming Palette, by right clicking on the Block
Diagram.
LabVIEW is graphical, so code of the form below is written graphically
if{condition = true}
{Program for true condition}
else (if{condition = false})
{Program for false condition}
Basic Steps
➢ Use a comparison to produce a true or false, then wire that result to the Case
Structure
➢ Place code in both the True and False parts of the case structure selected at the top of the
structure
➢ When the code runs, a true boolean value will run the True case, while a false will run the
False case
➢ Each for loop has a ‘Loop Count’ input to the loop and a ‘Loop Iteration’ output inside the
loop
➢ Simply wire up the number of loops you require to Loop Count and put appropriate
code inside loop
Construct a VI to add two numbers.
a=x+y
(output)
Panel)
Input a numerical data from the Front Panel (numerical control) and display the result b
(Numerical Indicator) after multiplication:
b = constant ⋅a.
Panel:
View – Controls Palette – Modern – Numeric – Numerical Control /Numerical Indicator
Diagram:
View – Functions Palette – Programming - Numeric – Multiply/Numerical Constant
Create a VI to add ‘5’ to a number if it is greater than ’10’, else add ’10’
indicator’ for the ouput
Palette)
structure as needed
number
number
In this lab, we learn the use of a tool called LABVIEW.
LABVIEW is the software which uses icons instead of data for
the coding of any programme or application.In above lab, we
performed Different operations such as Addition,
Multiplication, If else loop, on LABVIEW. Basically
LABVIEW have two different windows, front panel and block
diagram. On front panel, we designed icon as an input for the
programme. And in block diagram, we designed the whole logic
and visual coding of that programme.