0% found this document useful (0 votes)
402 views

Activity 1 Getting Familiar With LabVIEW

The document provides information about Activity 1 of an ECE 100 LabVIEW fundamentals course. The activity introduces students to the LabVIEW environment. It discusses intended learning outcomes including familiarizing students with the LabVIEW interface, distinguishing the front panel and block diagram, identifying basic tools and controls, and understanding applications of LabVIEW. The activity then guides students through opening the LabVIEW window and blank VI, which contains a front panel and block diagram used to build virtual instruments. Students are instructed to explore tools and controls on the front and block diagram panels to understand LabVIEW programming.

Uploaded by

alecsalutem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views

Activity 1 Getting Familiar With LabVIEW

The document provides information about Activity 1 of an ECE 100 LabVIEW fundamentals course. The activity introduces students to the LabVIEW environment. It discusses intended learning outcomes including familiarizing students with the LabVIEW interface, distinguishing the front panel and block diagram, identifying basic tools and controls, and understanding applications of LabVIEW. The activity then guides students through opening the LabVIEW window and blank VI, which contains a front panel and block diagram used to build virtual instruments. Students are instructed to explore tools and controls on the front and block diagram panels to understand LabVIEW programming.

Uploaded by

alecsalutem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

ECE 100 Fundamentals of LabVIEW Programming

GETTING FAMILIAR WITH LABVIEW


Activity No. 1

I. INTENDED LEARNING OUTCOMES

At the end of this activity, the student shall be able to:


1. Familiarize the NI LabVIEW environment.
2. Distinguish between the front panel and the block diagram.
3. Identify basic tools and controls in LabVIEW.
4. Enumerate real-world applications of LabVIEW.

II. BACKGROUND INFORMATION

LabVIEW stands for Laboratory Virtual Instrument Engineering Workbench. It is a system-design


platform and development environment for a visual programming language developed by the National
Instruments. The graphical language is named “G” (not to be confused with G-code). Originally released for
the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition, instrument control and
industrial automation on a variety of platforms including Microsoft Windows, various versions of UNIX,
Linux and Mac OS X.

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.

III. LEARNING ACTIVITIES

ACTIVITY 1.1: OPENING LabVIEW WINDOW

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 FileNew 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

ACTIVITY 1.2: EXPLORING LabVIEW FRONT PANEL TOOLS

Question: In LabVIEW, what is the main function of CONTROLS?


Controls define inputs, and indicators display outputs. Controls are typically knobs, push buttons, dials,
sliders, and strings. They simulate instrument input devices and supply data to the block diagram of the VI.

Question: In LabVIEW, what is the main function of INDICATORS?


Indicators are typically graphs, charts, LEDs, and status strings. Indicators simulate instrument output
devices and display data the block diagram acquires or generates.

1. Write the sequence to access the following objects and identify what are these objects:

Object name: Numeric Indicators Object name: Round LED


Sequence to access: Sequence to access:
FPModernNumericNumeric Indicators FPModernBooleanRound LED

Object name: Cluster


Sequence to access:
FPModernArray, Matrix &
ClusterCluster
Object name: String Control
Sequence to access:
FPModernString & PathString Control

Object name: Array


Sequence to access:
Object name: Waveform Chart FPModernArray, Matrix & ClusterArray
Sequence to access:
FPModernGraphWaveform Chart

Page 4
ECE 100 Fundamentals of LabVIEW Programming

Example of Sequence to Access System Numeric:


Right click anywhere in FPSystemNumericSystem Numeric
2. On an empty field in the Front Panel window, right click and choose Silver. Drag the following item in
the front panel window as shown:

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?
FPSilverNumericHorizontal Fill Slide

FPSilverNumericTank

FPSilverBoolean LED

FPSilverArray, Matrix & ClusterComplex Matrix

FPSilverString & PathCombo Box

Page 5
ECE 100 Fundamentals of LabVIEW Programming

3. On the Front Panel Menu, choose ViewTools 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 ObjectsLeft 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.

ACTIVITY 1.3: EXPLORING LabVIEW BLOCK DIAGRAM

Question: In LabVIEW, when do we use the BLOCK DIAGRAM window?


It provides a functional view of a system. Block diagrams give us a better understanding of a system’s
functions and help create interconnections withinPage it. They
8 are used to describe hardware and software
systems as well as to represent processes. Block diagrams are described and defined according to their
function and structure as well as their relationship with other blocks.
ECE 100 Fundamentals of LabVIEW Programming

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 DiagramProgrammingNumericAdd

Page 9
ECE 100 Fundamentals of LabVIEW Programming

Object name: Random Number (0-1) Object name: Cosine


Sequence to access: Sequence to access:
Block DiagramProgrammingNumeric Block Diagram Mathematics Elementary &
Random Number (0-1) Special FunctionsTrigonometric Functionscos

Object name: Tick Count (ms) Object name: Flat Sequence


Sequence to access: Sequence to access:
Block DiagramProgrammingTiming Tick Block Diagram ProgrammingStructuresFlat
Count (ms) Sequence

Object name: Max & Min Object name: Add Array Elements
Sequence to access: Sequence to access:
Block Diagram Programming Block Diagram ProgrammingNumeric Add
ComparisonMax & Min Array Elements

Question: What are the functions of the icons/objects shown in procedure 2?


 Random Number (0-1) - Produces a double-precision, floating-point number between 0 and 1.
The number generated is greater than or equal to 0, but less than 1. The distribution is uniform.
 Cosine - Calculates the cosine of a function or value.
Page 10
 Tick Count (ms) - To measure elapsed time in a VI that is running (milliseconds).
 Flat Sequence - Consists of one or more sub diagrams, or frames, that execute sequentially. This
structure is use to ensure that a sub diagram executes before or after another sub diagram.
ECE 100 Fundamentals of LabVIEW Programming

ACTIVITY 1.4: BUILDING A BASIC LabVIEW PROGRAM (VIRTUAL INSTRUMENT)

1. On the Front Panel window, put a Numeric Control by right-clicking anywhere in the Front Panel and
choose ControlsNumericNumeric Control. Next is put Tank by choosing
ControlsNumericTank. 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 ControlsNumericNumeric Indicator. Another way to replace the
Tank
is by right-clicking on the TankReplaceNumericNumeric 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 FPChoose PropertiesSelect Scale

TabScale 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.

Question: Explain how the VI works.


The Vi works as we add the numbers that are inputted in the numeric controls 1-5 showing their sum in
output 1. Meanwhile dividing the sum of indicators in output 1 by 5 which then shows quotient at output 2.

Page 15
ECE 100 Fundamentals of LabVIEW Programming

IV. MACHINE PROBLEM


Modify the VI in the Procedure 5 of Activity 1.4. Make use of the Tools Palette, and other visual
indicators to customize the VI. Your machine problem will be graded based on the following criteria:
 Use of Tools Palette to color and make your VI more visually presentable.
 Use of Visual indicators such as tanks, gauges, etc.
 Presentation of the User Interface such that, instead of using Numeric controls, use other types of
Numeric Controls.

Page 16
ECE 100 Fundamentals of LabVIEW Programming

V. ASSESSMENT TASKS

1. In your own perception, how important is LabVIEW in Engineering?


LabView is important to Engineering because it gives us a clear perspective in engineering design.
Knowing that this certain control interacts with this indicator is a helpful guide in creating creative concepts
and also it helps in our projects.

2. Give some real-life applications wherein LabVIEW can be used.


The real-life application LabView can be used in is in industrial design companies who produce prototypes
and inventions that they most need it for more efficient concept design.

3. What is the difference between a Numeric Control and a Numeric Indicator?


Numeric Control is the VI where in you can modify or change the number that is to be used, while the
Numeric Indicator is the VI that Visualizes what the number in the Numerical Control is in, it projects the
number.

4. How do we create a visual program in LabVIEW?


In the Front Panel window provides tools menus and all the controls needed for the application.
Programming is done by selecting functional controls in the Front Panel window; if appropriate, a
corresponding block is added to the Block Diagram.

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.

VII. RUBRICS FOR LABORATORY PERFORMANCE

Page 18

You might also like