Activity 1 Getting Familiar With LabVIEW
Activity 1 Getting Familiar With LabVIEW
Engineers and scientists use LabVIEW to bring information from the outside world into a computer
using data acquisition (DAQ) devices, process these data, and present these data to the user. Thus,
LabVIEW can be used to create virtual instruments (VI). A virtual instrument is a computer program that
imitates the functionality of the real-world physical instruments. These virtual instruments can also take in
external data and do something about these data, just as how a standard instrument will work. These VIs
however has the inherent advantage of being flexible in terms of its use. Being virtual, these instruments’
functionalities are being programmed, and hence can be changed whenever wanted and needed. In most
cases, virtual instrumentation also results to lower costs, as a single set of hardware (a DAQ device, a
computer, and software) can be configured to perform many instrumentation tasks that require multiple
physical instruments. A LabVIEW program is also called a virtual instrument or VI. Moreover, LabVIEW can
also be used to simulate processes and control external instruments and equipment. Thus, LabVIEW is
very useful in the field of instrumentation and control.
1. On your desktop computer, open NI LabVIEW 2012. When opened, a Welcome screen (or Getting
Started window in older versions) should appear as shown on the next page:
Question: What options do you see as the Welcome screen of LabVIEW 2012 appears? What do
the following options indicate?
Create Project -is the option where we can select what kind of template to use.
Open Existing - is the option where we can select already existing or done files.
Page 1
ECE 100 Fundamentals of LabVIEW Programming
2. Start using LabVIEW 2012 by clicking on the Blank VI. You can also choose FileNew VI Menu or
press Ctrl+N.
Question: How many windows did you see as you click on the Blank VI? What are the functions
of these windows? SCREEN-CAPTURE these windows and provide this on your activity report
for this specific question.
Page 2
ECE 100 Fundamentals of LabVIEW Programming
The Front panel - has controls and indicators, which are the interactive input and output
terminals, respectively, of the VI. Controls and indicators placed on the front panel are
automatically placed on the block diagram.
The Block Diagram - contains the graphical source code of a LabVIEW program. The concept of
the block diagram is to separate the graphical source code from the user interface in a logical and
simple manner.
3. On the Front Panel window, right click anywhere on an empty field. The Controls Palette will be
shown.
Question: As you browse on the Controls Palette, what options do you see? Enumerate these
options and state their functions. SCREEN-CAPTURE these options and provide this on your
activity report for this specific question
Modern - use the modern controls and indicators to create most front panels.
Silver - use the silver controls and indicators for VIs end users interact with.
System - controls and indicators are designed specifically for use with dialog boxes because the
controls adapt their color and appearance to match the standard dialog box controls for the platform
on which the end user runs the VI.
Classic - controls and indicators for creating controls with customized appearances, and for
printing panels in black and white.
Express - controls and indicators for Express Vis.
.NET and ActiveX - controls and indicators to manipulate .NET or ActiveX controls.
User Controls - contain custom controls and indicators you add to the subpalette by saving them
to the LabVIEW User Library.
Page 3
ECE 100 Fundamentals of LabVIEW Programming
1. Write the sequence to access the following objects and identify what are these objects:
Page 4
ECE 100 Fundamentals of LabVIEW Programming
Question: What is/are difference/s between the controls fetched from an ordinary controls
palette and the tools obtained from a Silver palette?
The difference of the tools fetched from the controls palette and silver palette are the visual design of the
tools with silver palette having a more solid and metallic like design
Question: What are the sequences to access the objects as shown above?
FPSilverNumericHorizontal Fill Slide
FPSilverNumericTank
FPSilverBoolean LED
Page 5
ECE 100 Fundamentals of LabVIEW Programming
3. On the Front Panel Menu, choose ViewTools Palette. A window as shown on the next page should
appear. Use this palette to change the background color of the Front Panel. SCREEN-CAPTURE this
procedure and provide it on your activity report.
Question: What are the options do you see on the Tools Palette Window. Explain the functions
of
these options.
Automatic Tool selection – if enabled and you move the cursor over objects on the front panel or
block diagram, LabVIEW automatically selects the corresponding tool from the Tools palette.
Operate Value - Changes the value of a control.
Positioning/Size/Select - Positions, resizes, and selects objects.
Edit Text - Creates free labels and captions, edits existing labels and captions, or selects the text
within a control.
Wiring - Wires objects together on the block diagram.
Object Shortcut Menu - Opens the shortcut menu of an object.
Scroll Window - Scrolls the window without using the scroll bars.
Set/Cleat Breakpoint - Sets breakpoints on VIs, functions, nodes, wires, structures, and lines of
script in a MathScript Node to pause execution at that location.
Probe Data - Creates probes on wires or MathScript Nodes. Use the Probe tool to check
intermediate values in a VI that produces questionable or unexpected results.
Get Color - Copies colors for pasting with the Coloring tool.
Set Color - Sets the foreground and background colors.
Page 6
ECE 100 Fundamentals of LabVIEW Programming
Question: How do you change the background color of the Front Panel Window?
With the use of Set Color option in the Tools Palette Window since the main function of this option is to set,
he foregrounds and background colors. Then Left-click on the Front Panel Window.
Question: What are the other options do you see in the Front Panel window, specifically the
options right below the Menu bar? Explain their uses.
Run - The Run button appears broken when the VI you are creating or editing
contains errors.
Run Continuously - Run Continuously button to run the VI until you abort or
pause execution. You also can click the button again to disable continuous
running.
Abort Execution - the Abort Execution button appears. Click this button to stop
the VI immediately if there is no other way to stop the VI.
Pause - button to pause a running VI. When you click the Pause button,
LabVIEW highlights on the block diagram the location where you paused
execution, and the Pause button appears red.
Text Settings - Text Settings pull-down menu to change the font settings for the
selected portions of the VI, including size, style, and color.
Align Objects - Align Objects pull-down menu to align objects along axes,
including vertical, top edge, left, and so on.
Distribute Objects - Distribute Objects pull-down menu to space objects evenly,
including gaps, compression, and so on.
Resize Objects - Resize Objects pull-down menu to resize multiple front panel
objects to the same size.
Reorder - Reorder pull-down menu when you have objects that overlap each
other and you want to define which one is in front or back of another.
4. Right click anywhere on the Front Panel, and drag one Numeric Control in the Panel. Select that
Numeric Control, copy it and paste in such a way that it will look scattered as shown on the figure.
Controls labelled Numeric to Numeric 6 should be provided from left to right and Controls labelled
Numeric, Numeric 7, Numeric 8, and Numeric 9 should be in a position from top to bottom.
Page 7
ECE 100 Fundamentals of LabVIEW Programming
5. Select Numeric, Numeric 7, Numeric 8 and Numeric 9 by Left Click and Hold until the said controls
are selected. Next, on the options just below the Menu bar, choose Align ObjectsLeft Edges.
Question: What happens to the numeric controls selected as you do procedure no. 5?
When Selected all Numeric, Numeric 7, Numeric 8 and Numeric 9, then clicking Align Objects to left edges
all Numeric Controls instantly moved to the left edges of the Front Panel Window
Question: How will you arrange the controls labelled Numeric, Numeric 2 until Numeric 6 in such
a way that they are positioned at the same level, horizontally?
By selecting Numeric, Numeric 2, 3 ,4 ,5, 6 then clicking Align Objects to Top Edges.
***Note: You can rename Numeric Control’s Name by double-clicking on its Label and then type your
desired name or label for that particular object.
1. Clear the Front Panel from the previous activities you have done. Together with this window, open
the Block Diagram window. On the Front Panel window, choose
Controls Numeric Numeric Control.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
2.
Place it on the front panel. Place also a Tank by choosing Controls Numeric Tank.
Question: What do you notice in the Block Diagram as you place objects like Numeric Control
and Tank on your front panel?
There is also same icon as the ones I placed in front panel but smaller in shape and size.
2. Write the sequence to access the following objects and identify what are these objects/icons:
Example of Sequence to Access Add function:
Right click anywhere in Block DiagramProgrammingNumericAdd
Page 9
ECE 100 Fundamentals of LabVIEW Programming
Object name: Max & Min Object name: Add Array Elements
Sequence to access: Sequence to access:
Block Diagram Programming Block Diagram ProgrammingNumeric Add
ComparisonMax & Min Array Elements
1. On the Front Panel window, put a Numeric Control by right-clicking anywhere in the Front Panel and
choose ControlsNumericNumeric Control. Next is put Tank by choosing
ControlsNumericTank. The front panel and block diagram window should look like this:
2. On the Block Diagram window, connect the Numeric Control’s output node to the input node of the
Tank. You can do this by positioning your mouse’s cursor on the arrow node pointing outward the Numeric
Control. Once you position the cursor, a “spool/thread” marking will appear. This indicates that you are
about to wire the control to the other LabVIEW Object. Once wired, the block diagram should look like this:
Page 11
ECE 100 Fundamentals of LabVIEW Programming
3.
On
the Front Panel window, click the upper arrow on the Numeric Control until it reaches the value 2. Then
click on the Run button located just below the Menu bar. The Run button is shown to the right.
Question: What happens to the Tank as you run your VI? SCREEN-CAPTURE the result and
include this on your activity report.
The Tank fills up as the same amount as the Numeric Control states
4. Set back the Numeric Control to 0. Click now on the Run Continuously button which is
located right after the Run button. Click the upper arrow continuously on the Numeric Control.
Question: What is the difference when you execute the program by clicking on Run
and Run Continuously button? SCREEN-CAPTURE the result and include this on your activity
report.
As I click on the upper button of the Numeric Control continuously the Tank all also fills up continuously.
Page 12
ECE 100 Fundamentals of LabVIEW Programming
Page 13
ECE 100 Fundamentals of LabVIEW Programming
5. Replace the Tank with Numeric Indicator. You can do this by selecting the Tank and press Delete on
your Keyboard, then Choose ControlsNumericNumeric Indicator. Another way to replace the
Tank
is by right-clicking on the TankReplaceNumericNumeric Indicator.
Question: State the difference between using a Numerical Indicator and Tank. SCREEN-
CAPTURE the result of this procedure and include it in your activity report.
The difference between the Tank and Numeric Indicator is that, the Tank fills-up up to the point given by
Numeric Control, and that the Numeric Indicator indicates the number of the Numeric Control.
***Note: You can change the scale of the Tank if you want your Tank to display negative values. You can
do that by Right-Clicking the Tank Object in the FPChoose PropertiesSelect Scale
TabScale Range and then define your minimum and maximum range.
Page 14
ECE 100 Fundamentals of LabVIEW Programming
5. Clear the Front Panel and the Block Diagram from the previous procedures. Create a VI with the
following Block Diagram objects as shown:
Question: What output is generated in the Numeric Indicator labelled Output 1?
Question: What output is generated in the Numeric Indicator labelled Output 2?
Question 1: The output generated in the Numeric Indicator Output 1 is the sum of all inputs 1-5.
Question 1: The output generated in the Numeric Indicator Output 2 is the sum of all inputs 1-5 but also
divided by 5.
Page 15
ECE 100 Fundamentals of LabVIEW Programming
Page 16
ECE 100 Fundamentals of LabVIEW Programming
V. ASSESSMENT TASKS
Page 17
ECE 100 Fundamentals of LabVIEW Programming
VI. CONCLUSION
LabView is really a compatible for all user and most for the Engineers because it gives the user a lot of tool,
controls and indicators to create efficient and visual control platform. Its also guide us as we use the tool
and suddenly happens when there is error it will inform us about the error which is an amazing feature of
the LabView.
Page 18