LabVIEW Programming Quick Start
LabVIEW Programming Quick Start
October, 2011
LabVIEW is a software product from National Instruments for data acquisition, signal
processing, instrument control and industrial automation. It is the most popular application for
computer-based data collection and control of an experiment, and widely used by industry. The
LabVIEW home page is www.ni.com/labview/.
The objective of this quick start guide is for you to learn a few of the very basic principles of
LabVIEW through hands-on activities that do not require data acquisition hardware. You should
have already downloaded and installed LabVIEW to proceed.
The first exercise below is from National Instruments and will get you accustomed to the
different features and functions of LabVIEW. A second exercise has you write a custom
application to convert temperature readings from Celsius to Fahrenheit.
The first exercise will take about 30 minutes and the second about 15 minutes. It will take much
longer to download and install the software so plan accordingly.
Exercise 1: A First VI
You are now ready for the 30 minute exercise, which is to go through the exercise in the
Getting Started with LabVIEW Virtual Instruments document that can be obtained from the
ME2011 LabVIEW resources page.
When you have completed the exercise, proceed to the next.
Caution: This exercise is designed to familiarize you with the common components and features
of LabVIEW. If you skip this step, you will still be able to complete exercise 2, but you will be
much less familiar with the conceptual steps you are taking.
Page 1 of 6
Under New, click on Blank VI to start a new VI. The Front Panel and Block Diagram windows
will open. Activate the Front Panel window. If the Controls palette is not visible, on the Front
Panel select View > Controls Palette. The Controls palette looks like this
On the Controls palette, under Express, click on Num Ctrls to reveal the desired controls.
Page 2 of 6
Place two instances of the Num Ctrl on the Front Panel. After placing, right click on the control
and select Properties. Change the label of the left control to Degrees C and the right to
Degrees F. The Front Panel will look like this
Switch to the Block Diagram (Ctrl-E) and bring up the Functions palette (View > Functions
Palette).
Page 3 of 6
In the Functions palette, select Express then Arith & Compar. Place a Formula block on the
block diagram. The Configure Formula dialog automatically opens (if not, right-click on the
block, then select Properties). Enter the degrees C to degrees F conversion formula where X1 is
the input (degrees C) and the result of the formula is the output (degrees F). The formula is
X1*1.8 + 32 and the dialog box looks like
Page 4 of 6
Now is a good time to save your work. File > Save. Save to the Desktop and give it the name
TempConvert. The Block Diagram now looks like
Page 5 of 6
Page 6 of 6