Lab#1
Lab#1
ECE206 L
Experiment-1
The LabVIEW Programming Environment and Basic Operations
Spring 2024
Authors: A b d u l l a h
Alazmi
Ghazi Alazmi
Date:
1|Page
Table of Contents
Abstract.................................................................................................................................3
List of Figures.......................................................................................................................3
List of Tables.........................................................................................................................3
Background and Reference.................................................................................................3
Lab Procedure and Equipment...........................................................................................4
Procedure...........................................................................................................................................4
Program 1: Celsius (℃) to Fahrenheit (℉)....................................................................................5
Program 2: Fahrenheit (℉) to Celsius (℃)....................................................................................5
Program 3: Slope (𝑚) Calculator.....................................................................................................6
Theoretical Analysis.............................................................................................................7
Program 1, Celsius to Fahrenheit......................................................................................................7
Program 2: Fahrenheit to Celsius......................................................................................................7
Program 3: Slope Calculator.............................................................................................................7
Discussion..............................................................................................................................9
2|Page
Abstract
The main purpose of this lab is to familiarize the LabVIEW software and by using
the software develop a program for performing the following function:
Conversion process between Fahrenheit and Celsius Degree temperatures and
vice versa.
Develop a program for a line slope calculator.
List of Figures
List of Tables
Lab Manual
References:
Getting Started with LabVIEW.
https://www.ni.com/getting-started/labview-basics/environment
3|Page
Lab Procedure and Equipment
Equipment:
Computer Desktop
Windows 10 pro OS
LabVIEW 2018 software
Notebook, and pencil
Procedure:
1. Launched LabVIEW from Start >> Programs >> National Instruments >>
LabVIEW 2022>> LabVIEW 2022.
2. Clicked File >> New VI to open a new front panel.
3. Selected Window >> Tile Left and Right to display the front panel and block
diagram side by side.
4. Created a numeric digital control. used this control to enter the value for
degrees Centigrade.
5. Create a numeric indicator. You will use this indicator to display the value for
degrees Fahrenheit.
6. Displayed the block diagram by selecting Window >> Show Diagram.
7. Multiply and Add functions were selected on the Functions >>Numeric palette
and placed them on the block diagram.
8. Numeric constant were selected on the Functions >> Numeric palette and placed
two of them on the block diagram.
9. Typed 1.8 in one constant and repeated the process for a second constant of 32.0.
10. Used the Wiring tool to wire the icons in the block diagram.
11. Selected File >> Save. Type ConvertCtoF.vi in the dialog box. Clicked the Save
button to save the file.
13. The same steps were followed to Develop a Program to convert ℉ to ℃, and to
12. A number were entered in the numeric control to run the VI.
Develop a Program to Calculating the Slope of a Line but with a different number
of numeric digital controls.
4|Page
Program 1: Celsius (℃) to Fahrenheit (℉)
The formula for converting degrees Celsius to degrees Fahrenheit is as follows:
℉ = (℃ × 1.8) + 32
Here F represents the Fahrenheit and C represents the Celsius. This formula has been used
to program in LabVIEW’s software. This program is created using steps involve above to
made a conversion function of temperature from Celsius (℃) to Fahrenheit (℉).
℃ = (℉ − 32) ÷ 1.8
Here F represents the Fahrenheit and C represents the Celsius. This formula
has been used to program in LabVIEW’s software. This program is created using steps
involve in program 1, to made a conversion function of temperature from degrees
Fahrenheit to degrees Celsius.
℉ = (℃ × 1.8) + 32
Conversion Formula for Celsius to Fahrenheit is:
Example:
For 10℃
℉ = (10× 1.8) + 32=50℉
For -15℃
℉ = (-15× 1.8) + 32=5℉
𝑦2 − 𝑦1
Program 3: Slope Calculator
7|Page
result.
8|Page
Program 2: Fahrenheit to Celsius
The program is correct to converting of Celsius to Fahrenheit up to absolute zero. For above it shows erroneous
result.
(1,1) (2,2) 1
(2,2) (1,1) 1
(2,3) (3,3) 0
Results:
The lab was conducted to familiarize the LabVIEW software and by using
the software develop a program for converting Celsius to Fahrenheit and vice versa. A
program was also developed in the lab for calculating the slope of the line. From the
technical analysis it can be observed that a limiting factor required below absolute zero
on the temperature conversions in both Program 1 and Program 2. All other results are
correct for Program 1 and Program. The results obtained for the program 3 are as per
9|Page
theoretical calculation. All the results are tabulated in lab record.
10 | P a g e
Discussion
1. What is a VI? What are the three main parts of a VI? Briefly describe each.
A “VI” is stands for virtual instrument. A LabVIEW programs are called virtual
Instruments (VIs). It has three parts. These parts are as below:
Front panel: It serves as the user interface.
Block diagram: It contains the graphical source code that defines the functionality
of the VI.
Icon and connector pane: It Identifies the VI so that VI can be used in another VI.
A VI within another VI is called a subVI. A subVI corresponds to a subroutine in
text-based programming languages.
The three palettes are the tools, controls, and functions palette. The tool palette is
available on the front panel and the block diagram and it is used to operate and modify
front panel and block diagram objects. The controls palette is available only on the front
panel and it contains the controls and indicators used to create the front panel. The
functions palette is available only on the block diagram and it contains the VIs and
functions used to create the block diagram.
LabVIEW follows a dataflow model for running VIs. When a node completes
execution, it supplies its output data to its output terminals. This passes the output data
to the next node in the dataflow path.
4. How can you tell the difference between controls and indicators on the
front panel? On the block diagram?
The main difference between controls and indicator in front panel is that the controls
can be edited and indicators are where values are displayed in the front panel . The
difference is the same for the block program except for the controls have a switch next
11 | P a g e
to them to edit their values
1. Highlight all functions that are needed in the subVI, right clicking and selecting the create
subVI option.
2. The second method is to create a standalone VI, and then dragging and dropping it into
another VIs block program.
12 | P a g e