0% found this document useful (0 votes)
12 views23 pages

Lab View

Uploaded by

prajwalsaunshi76
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
12 views23 pages

Lab View

Uploaded by

prajwalsaunshi76
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 23

LabVIEW Programming Basics-21EC384

21EC384

LabVIEW Programming Basics

III Semester

Department of Electronics and Communication


Engineering

Name:

U SN:

Section: Batch:

1
LabVIEW Programming Basics-21EC384

I. VISION MISSION AND PROGRAM EDUCATIONAL OBJECTIVES


STATEMENT
INSTITUTE VISION
To be a leader in imparting value based Technical Education and Research for the benefit of society.

INSTITUTE MISSION
 To provide state of the art Infrastructure facilities.
 To implement modern pedagogical methods in delivering the academic programs with
experienced and committed faculty.
 To create a vibrant ambience that promotes Learning, Research, Invention and Innovation.
 To undertake manpower and skill development programmes for Academic Institutions and
Industries.
 To enhance Institute Industry Interface through Collaborative Research and Consultancy
 To generate and disseminate knowledge through training
programme/workshops/seminars/conferences/publications.
 To be a more comprehensive college in terms of the number of programs offered.
 To relentlessly pursue professional excellence with ethical and moral values.

DEPARTMENT VISION
To develop outstanding Electronics and Communication Engineers to meet the ever changing
Social and Technological needs of the Society.
DEPARTMENT MISSION
MoD1 To provide State-of-the-Art infrastructure in Electronics and Communication Engineering.
To disseminate strong theoretical and practical exposure to meet the emerging trends in the
MoD2 industry.
MoD3 To promote a free thinking environment with innovative teaching-learning pedagogy.
To develop value based socially responsible professionals for the betterment of the
MoD4
Society.

PROGRAM EDUCATIONAL OBJECTIVES (PEO)


Develop and excel in their chosen profession on technical front and/or progress towards
PEO1
advanced continuing education, Inter-disciplinary Research and Entrepreneurship.
Become reputed and innovative solution provider to complex system design problems or
PEO2
challenges relevant to Electronics and Communication.
Progress as effective team members and achieve a leadership position with trust, mutual
PEO3
respect and professional ethics.
Become responsible and pro-active citizens for the overall welfare and progress of the
PEO4
Society.

2
LabVIEW Programming Basics-21EC384
II. PO AND PSO STATEMENT

Engineering knowledge: Apply the knowledge of mathematics, science, engineering


PO1 fundamentals, and an engineering specialization to the solution of complex engineering
problems.
Problem analysis: Identify, formulate, review research literature, and analyze complex
PO2 engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
PO3
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
Conduct investigations of complex problems: Use research-based knowledge and
PO4 research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources, and
PO5 modern engineering and IT tools including prediction and modelling to complex
engineering activities with an understanding of the limitations.
The engineer and society: Apply reasoning informed by the contextual knowledge to
PO6 assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
Environment and sustainability: Understand the impact of the professional engineering
PO7 solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
PO8
norms of the engineering practice.
Individual and team work: Function effectively as an individual, and as a member or
PO9
leader in diverse teams, and in multidisciplinary settings.
Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and
PO10
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.
Project management and finance: Demonstrate knowledge and understanding of the
PO11 engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
Life-long learning: Recognize the need for, and have the preparation and ability to engage
PO12
in independent and life-long learning in the broadest context of technological change.
Develop the components for analog and digital systems, communication systems, control
PSO1 and signal processing systems using acquired knowledge of basic skills and various design
tools.
Formulate the solution for interdisciplinary problems through acquired programming
PSO2
knowledge in the respective domain by complying real-time constraints.

3
LabVIEW Programming Basics-21EC384
LabVIEW Programming Basics
Course Code 21EC384 CIE Marks 50
Teaching Hours/Week (L: T:P: S) 0:0:2:0 SEE Marks 50
Credits 1 Exam Hours 03
Course objectives:
 Aware of various front panel controls and indicators.
 Connect and manipulate nodes and wires in the block diagram.
 Locate various toolbars and pull-down menus for the purpose of implementing specific functions.
 Locate and utilize the context help window.
 Familiar with LabVIEW and different applications using it.
 Run a Virtual Instrument (VI).
Sl.No VI Programs (using LabVIEW software) to realize the following:
1 Basic arithmetic operations: addition, subtraction, multiplication and division
2 Boolean operations: AND, OR, XOR, NOT and NAND
3 Sum of ‘n’ numbers using ‘for’ loop
4 Factorial of a given number using ‘for’ loop

5 Determine square of a given number


6 Factorial of a given number using ‘while ‘loop

7 Sorting even numbers using ‘while’ loop in an array

8 Finding the array maximum and array minimum


Demonstration Experiments (For CIE)
9 Build a Virtual Instrument that simulates a heating and cooling system. The system must be able to be
controlled manually or automatically.
10 Build a Virtual Instrument that simulates a Basic Calculator (using formula node).
11 Build a Virtual Instrument that simulates a Water Level Detector.

12 Demonstrate how to create a basic VI which calculates the area and perimeter of a circle.

Course outcomes (Course Skill Set):


At the end of the course the student will be able to:
1. Use Lab VIEW to create data acquisition, analysis and display operations
2. Create user interfaces with charts, graph and buttons
3. Use the programming structures and data types that exist in Lab VIEW
4. Use various editing and debugging techniques
Assessment Details (both CIE and SEE)
The weightage of Continuous Internal Evaluation (CIE) is 50% and for Semester End Exam (SEE) is
50%. The minimum passing mark for the CIE is 40% of the maximum marks (20 marks). A student shall be
deemed to have satisfied the academic requirements and earned the credits allotted to each course.

4
LabVIEW Programming Basics-21EC384

Introduction to LabVIEW

Aim: To understand the principles of Virtual Instrumentation (VI).

Theory: Virtual instrumentation is the use of customizable software and modular


measurement hardware to create user-defined measurement systems, called virtual
instruments. Traditional hardware instrumentation systems are made up of pre-defined
hardware components, such as digital millimeters and oscilloscopes that are completely
specific to their stimulus, analysis, or measurement function.

LabVIEW: Laboratory Virtual Instrumentation Engineering Workbench (LabVIEW) is


agraphical programming language that uses icons instead of lines of text to create
applications. In contrast to text-based programming languages, where instructions determine
program execution, LabVIEW uses dataflow programming, where the flow of data
determines execution. In LabVIEW, a user interface can be built by using a set of tools and
objects. The user interface is known as the front panel. Then code can be added using
graphical representations of functions to control the front panel objects. The block diagram
contains this code. In some ways, the block diagram resembles a flowchart.A VI contains the
following three components:

Front panel - Serves as the user interface. The front panel is the user interface of the VI.
The front panel is built with controls and indicators, which are the interactive input and
output terminals of the VI, respectively. Controls are knobs, pushbuttons, dials, and other
input devices. Indicators are graphs, LEDs, and other displays. Controls simulate
instrument input devices and supply data to the block diagram of the VI. Indicators
simulate instrument output devices and display data the block diagram acquires or
generates. After the front panel is build, add code using graphical representations of
functions to control the front panel objects. The block diagram contains this graphical
source code. Front panel objects appear as terminals on the block diagram.

5
LabVIEW Programming Basics-21EC384

Block diagram - Contains the graphical source code that defines the functionality of VI.
Icon and connector panel - Identifies the VI so that the VI can be used in another VI.
AVI within another VI is called a sub VI. A sub VI corresponds to a subroutine in text-
based programming languages. Additionally, the block diagram contains functions and
structures from built-in LabVIEW VI libraries. Wires connect each of the nodes on the
block diagram, including control and indicator terminals, functions, and structures.

LabVIEW Palettes-LabVIEW palettes give provide the options needed to create and editthe
front panel and block diagram. The Tools palette is available on the front panel and the block
diagram. A tool is a special operating mode of the mouse cursor. By selecting a tool, the
cursor icon changes to the tool icon. Use the tools to operate and modify front panel and
block diagram objects. Select Window » Show Tools Palette to display the Tools palette.

6
LabVIEW Programming Basics-21EC384

The Tools palette can be placed anywhere on the screen. If automatic tool selection is
enabled and as the cursor is moved over objects on the front panel or block diagram,
LabVIEW automatically selects the corresponding tool from the Tools palette.

The Controls palette: The Controls palette is available only on the front panel. The Controls
palette contains the controls and indicators used to create the front panel. To display the
Controls palette, Select Window » Show Controls Palette or right-click the front panel
workspace. The Controls palette can be placed anywhere on the screen.

The Functions palette: The Functions palette is available only on the block diagram. The
Functions palette contains the VIs and functions used to build the block diagram. To display
the Functions palette, select Window » Show Functions Palette or right-click the block
diagram workspace. The Functions palette can be placed anywhere on the screen.

7
LabVIEW Programming Basics-21EC384

Dataflow Programming: LabVIEW follows a dataflow model for running VIs. A block
diagram node executes when all its inputs are available. When a node completes execution, it
supplies data to its output terminals and passes the output data to the next node in the
dataflow path.

Procedure:

1. Open NI LabVIEW and press <Ctrl_N> to open a blank VI.

2. Press <Ctrl_T> to tile front panel and block diagram windows.

3. Press<Ctrl B> to remove broken lines.

8
LabVIEW Programming Basics-21EC384

EXPERIMENT NO :01 DATE:

Arithmetic operations

Aim: To perform Basic arithmetic operations: addition, subtraction, multiplication and


division

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

Example 1. Execute a VI to perform the operation of Y=𝑎2 + 𝑏2 + 2𝑎𝑏.

9
LabVIEW Programming Basics-21EC384

Example 2. Execute a VI to perform the operation of Y=(𝑎 − 𝑏)2 + 2𝑎𝑏.

Example 3. Execute a VI to perform the operation of Y=(a*b*c)+(a*b)

Example 4. Execute a VI to Convert Celsius to Fahrenheit. Hint: F= (1.8C+32)

10
LabVIEW Programming Basics-21EC384

Example 5. Execute a VI to Convert Fahrenhei to Celsius. Hint: C= (5/9)*(32-T)

11
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 02 DATE:
Boolean operations

Aim: To perform Boolean operations: AND, OR, XOR, NOT and NAND

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

Example 1. Execute a VI to perform the AND operation

Example 2 . Execute a VI to perform the OR operation

12
LabVIEW Programming Basics-21EC384

Example 3. Execute a VI to perform the XORoperation

Example 4 . Execute a VI to perform the NOT operation

Example 5. Execute a VI to perform the NAND operation

13
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 03 DATE:

Aim: To perform Sum of ‘n’ numbers using ‘for’ loop

Instructions:

 Step 1:First of all move to the front panel and press right then control palette and choose numeric option
place in the front panel and its correspondent will shown block diagram.

 Step 2: Move to block diagrams press right then according to figure choose while loop in structure option.

 Step 3: Now press right at the end of the while loop and select the shift register. according to the below figure.

 Step 4: Select numeric button and choose constant and connect it to register shown below.

 Step 5:Connect this numeric constant with the register

Step 6: Now select the increment option from the numeric tab.
 Step 7 : Now will add the ending terminal of the while loop function means when our desired number will
come our function will stop.
 Step 8: At right side shift register press right and select indicator from creates

Step 9: Now move to front panel and put the values of any N natural number and you will get the sum of
numbers till that number.

14
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 04 DATE:

Aim: To perform Factorial of a given number using ‘for’ loop

Instructions:

Step 1:On the block diagram window, from the function palette select structures and then select for loop

Step 2:Connect the numeric control in which the user input will be stored to the N i.e. number of loops of for
loop

Step 3: we must have to initialize the shift register. From the function palette select numeric and then select
constant
Step 4: Place this numeric with the shift register and set its value to 1

Step 5:The other input of the multiply block we have to connect the incremented iteration because the number
of iterations start from 0 but we want the factorial from 1 onwards, because the factorial will turn out
to be zero otherwise From the function palette select numeric and then select increment

Step 6: At the input of this increment block connect the iterative index of the while loop, and connect the
output of this increment block to the remaining input of the add block. The resulting factorial
calculating block diagram will look like the one
.
Step 7 :At the right shift register click right and from the drop down select create and then select indicator

Step 8: The complete block diagram of the factorial calculating VI is shown in the figure below

15
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 05 DATE:

Aim: To perform a square of a given number using VI

Instructions:

Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

16
LabVIEW Programming Basics-21EC384

EXPERIMENT NO :06 DATE:

Aim: To perform a Factorial of a given number using ‘while ‘loop

Instructions:

Step 1:On the block diagram window, from the function palette select structures and then select
While loop

Step 2:Connect the numeric control in which the user input will be stored to the N i.e. number of loops of for
While loop

Step 3: we must have to initialize the shift register. From the function palette select numeric and then select
constant
Step 4: Place this numeric with the shift register and set its value to 1

Step 5:The other input of the multiply block we have to connect the incremented iteration because the number
of iterations start from 0 but we want the factorial from 1 onwards, because the factorial will turn out
to be zero otherwise From the function palette select numeric and then select increment

Step 6: At the input of this increment block connect the iterative index of the while loop, and connect the
output of this increment block to the remaining input of the add block. The resulting factorial
calculating block diagram will look like the one
.
Step 7 :At the right shift register click right and from the drop down select create and then select indicator

Step 8: The complete block diagram of the factorial calculating VI is shown in the figure below

17
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 07 DATE:

Aim: To perform Sorting even numbers using ‘while’ loop in an array

Instructions:

Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

18
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 08 DATE:

Aim: To perform the array maximum and array minimum

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

19
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 09 DATE:

Aim: To Build a Virtual Instrument that simulates a heating and cooling system. The system must be able
to be controlled manually or automatically.

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

20
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 10 DATE:

Aim: To Build a Virtual Instrument that simulates a Basic Calculator (using formula node).

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

21
LabVIEW Programming Basics-21EC384
EXPERIMENT NO : 11 DATE:

Aim: To Build a Virtual Instrument that simulates a Water Level Detector.

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

22
LabVIEW Programming Basics-21EC384

EXPERIMENT NO : 12 DATE:

Aim: To Demonstrate how to create a basic VI which calculates the area and perimeter of a circle.

Instructions:
Step 1: Select controls by right clicking on the front panel and choose the specific type of
control similarly choose indicators.

Step 2: Different operators such as addition, subtraction, multiplication, less than, greater
than, Boolean, etc can be performed by right clicking on block diagram.

Step 3: Using wires inputs and outputs are connected to the respective operators in the
block diagram panel.

Step 4: Enter the input values in front panel.


Step 5: Observe the output by performing single step and continuous mode execution.

23

You might also like