Sie sind auf Seite 1von 15

Laboratory Exercise No.

8
LabVIEW Exploration and the Design of Systems Through Virtual Instruments (VIs)
1. Objective:
The activity aims to explore the use of Laboratory Virtual Instrumentation Engineering Workbench and
design Virtual instruments,Vis.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 Learn the different controls, functions and indicators available for the Input, Process and Output of
a LabVIEW graphical program called virtual instruments (Vis).
2.2 Build a simple .vi file for the sum and average of three numerical values using numeric controls
(Input), add and divide functions (Process), and numeric indicator (Output).
2.3 Create sub-VIs and use this concept in the development of a more complicated system.
3. Discussion:
Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is a system-design platform and
development environment for a visual programming language from National Instruments.
Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition,
instrument control, and industrial automation on a variety of operating systems (OSs), including Microsoft
Windows, various versions of Unix, Linux, and macOS.

LabVIEW is systems engineering software for applications that require test, measurement, and control with
rapid access to hardware and data insights. It solves engineering challenges across a broad range of
application areas. LabVIEW simplifies hardware integration so that you can rapidly acquire and visualize
data sets from virtually any I/O device, whether by NI or a third-party. Combined with a graphical
programming syntax that reduces programming time.

LabView includes a compiler that produces native code for the CPU Sunil platform. This aids performance.
The graphical code is translated into executable machine code by interpreting the syntax and by compiling.
The LabVIEW syntax is strictly enforced during the editing process and compiled into the executable
machine code when requested to run or upon saving. LabVIEW includes extensive support for interfacing to
devices, instruments, cameras, and other devices. Users interface to hardware by either writing direct bus
commands (USB, GPIB, Serial) or using high-level, device-specific, drivers that provide native LabVIEW
function nodes for controlling the device. LabVIEW is an inherently concurrent language, so it is very easy
to program multiple tasks that are performed in parallel via multithreading. For example, this is done easily
by drawing two or more parallel while loops and This is a great benefit for test system automation, where it
is common practice to run processes like test sequencing, data recording, and hardware interfacing in
parallel. Due to the longevity and popularity of the LabVIEW language, and the ability for users to extend its
functions, a large ecosystem of third party add-ons has developed via contributions from the community.
This ecosystem is available on the LabVIEW Tools Network, which is a marketplace for both free and paid
LabVIEW add-ons.
4. Resources:
LabVIEW
5. Procedure:
A. Input, process and output of a simple graphical program involving the sum and average of
three numerical values
1. Create a folder with a name Maranan_yourSurnameLabExer09 and place it on the desktop. All
1
your files must be saved here. Before the end of the period, the contents of this folder must be
sent to your email address and also to your instructors email address.
2. Open LabVIEW 15 and the Getting Started appears. Click the Blank VI option. The Block
Diagram and Front Panel windows should appear.
3. Click View of the Front Panel window and choose Controls Palette, Express, Numeric Control.
Click Num Control and drop into the Front Panel window. Observe what happens in the Block
Diagram window. Change its label from numeric to x. Add two (2) more Num Ctrl and label
them as y and z (place them below one another). These x, y and z numeric controls form part
of the Input (these controls have arrow pointing outward indicating that the data they hold serve
as an input to another). Add two numeric indicators (place them on the right side, one on top of
another) and label them as SUM and AVERAGE. The SUM and AVERAGE numeric indicators
form part of the output (these controls have arrow pointing inward indicating that they accept
data from an input).
4. Click View of the Block Diagram window and choose Function Palette, each of which performs
a certain function and has input and output connectors. Place an ADD function in between the
input and output controls. Place also a DIVIDE function below the ADD function. Right click
each of these functions and select Visible Items, then checking the Label option. Establish the
flow of data by wiring the x, y and z to the ADD function and then wire the output of the ADD
function to the SUM indicator. Wire the output of the ADD function to the DIVIDE function.
Right click the other input of the Divide function and choose Create < Constant. Type the
number 3 when the constant node appears. Wire the output of the Divide function to the
AVERAGE indicator. Click Clean Up Diagram icon and observe what happens. Note: While the
FP window is within your view, you may use CTRL E to view BD window.
5. Save the file as yourSurnameProcedureA and place it inside the
Maranan_yourSurnameLabExer09 folder. Provide the values of the x, y and z numeric controls
through Front Panel window and click Run. Show the output of Procedure A in Table A.
B. Different Controls, Functions and Indicators for the Input, Process, and Output of a
LabVIEW program.
1. Determine the different controls available for the Input of a VI. Show the output of Procedure
B.1 in Table B1. Hint: Place a control in FP window, press CTL H and Hover the control for the
description.
2. Determine the different functions available for the Process of a VI. Show the output of
Procedure B.2 in Table B2. Hint: Place a function in BD window, press CTL H and Hover the
function for the description.
3. Determine the different indicators available for the Output of a VI. Show the output of
Procedure B.3 in Table B3. Hint: Place an indicator in FP window, press CTL H and Hover the
indicator for the description.
C. Creating yourSurnameProcedureA.vi as a VI that is used in higher-level VI ( called subVI)
1. Right click the icon at the top-right corner of the Front Panel window and select Show
connector to display the connector pane. Right click this connector pane and choose Patterns.
Choose the connector pane pattern having three inputs (3 blank rows in the first column) and
two outputs ( 2 blank rows in the second column).
2. To assign the first row first column slot of the connector plane to the numeric control x, click the
slot on the first row first column of the connector pane and click the numeric control with a label
x. To assign the second row first column slot of the connector plane to the numeric control y,

2
click the slot on the second row first column of the connector pane and click the numeric
control with a label y. To assign the third row first column slot of the connector plane to the
numeric control z, click the slot on the third row first column of the connector pane and click the
numeric control with a label z.
3. To assign the first row second column slot of the connector plane to the numeric indicator
SUM, click the slot on the first row second column of the connector pane and click the numeric
indicator with a label SUM. To assign the second row second column slot of the connector
pane to the numeric indicator AVERAGE, click the slot on the second row second column of
the connector pane and click the numeric indicator with a label AVERAGE.
4. To explicitly identify the subVI icon, double click this icon and Icon Editor window appears. In
Line 1 text, type SUM. In Line 2 text, type &. In Line 3 text, type AVERAGE. Then, click OK.
5. Save the changes you made. Show the Front Panel and Block Diagram windows using Table
C.
D. Creating Vis for Plane and Solid Figures
1. Create a virtual instrument for the computation of area and perimeter of each of the following
plane figures:
a. Square
b. Rectangle
c. Circle
d. Right Triangle
e. Regular Pentagon
Show the output in Procedure D1
2. Create a virtual instrument for the computation of volume and surface area of each of the
following:
a. Cube
b. Rectangular Parallelepiped
c. Sphere
d. Cone
e. Right Circular Cylinder

3
Course: CHE 508 Laboratory Exercise No.: 8
Section: CH51FC1 Date Performed: August 16, 2017
Group Members: Date Submitted: August 23, 2017
Martija, Nelykah Rianne P. Instructor:
Engr. Crispulo Maranan
6. Data and Results:
A.
Table A. Front Panel and Block Diagram windows of the Simple LabVIEW graphical program
(VI) involving sum and average of three numerical values
Front Panel Block Diagram

B.
Table B1. Different Controls Available for the Input of VIs
Name and Icon of the Control Description of the Control
Numeric control is the simplest way to enter numeric
data. You can resize these front panel objects
horizontally to accommodate more digits.

Use to enter numeric data in a rotary action.

Use the time stamp control to send a time and date value
to the block diagram.

4
Use to display numeric data in a vertical or horizontal
slide with a customizable scale.

Use to display numeric data in a vertical or horizontal


slide with a customizable scale and a pointer that helps
you see the exact value.

A color box displays a color that corresponds to a


specified value. For example, you can use color boxes to
indicate different conditions, such as out-of-range values.
The color value is expressed as a hexadecimal number
with the form RRGGBB.

Use string controls to receive text from the user such as a


password or user name.

Use path controls to enter the location of a file or


directory.

Use as a control to select a command by rocking,


toggling, or switching the object from one position to the
other.

Use as a control to select a command by depressing the


button.

5
Table B2. Different Functions Available for the Process of VIs
Name and Icon of the Function Description of the Function

Computes the sum of the inputs.


Add

Computes the difference of the inputs.


Subtract

Returns the product of the inputs.


Multiply

Computes the quotient of the inputs.


Divide

Computes the square root of the input value.


Square Root

Computes the square of the input value.


Square

Adds 1 to the input value.


Increment

Subtracts 1 from the input value.


Decrement

Divides 1 by the input value.


Reciprocal

Multiplies x by 2 raised to the power of n.


Scale by Power of 2

Returns the absolute value of the input.


Absolute Value
Rounds the input to the nearest integer. If the value
of the input is midway between two integers, the
Round to Nearest function returns the nearest even integer.
Returns the product of all the elements in numeric
array. If numeric array is an empty array, the
function returns a value of 1. If numeric array
Multiply Array Elements contains only one element, the function returns that
element.

6
Returns the sum of all the elements in numeric
array.
Add Array Elements
Computes the integer quotient and the remainder of
the inputs. This function rounds floor(x/y) to the
Quotient and Remainder nearest integer towards -inf.

Table B3. Different Indicators Available for the Output of VIs

Name and Icon of the Indicator Description of the Indicator

Simplest way to display numeric data.

Use to show progress in a vertical or horizontal bar.

Use to show progress in a vertical or horizontal bar


with customizable dividers to help you break up the
value into equal parts.

Use to display numeric data in a rotary action.

7
Use to display numeric data in a vertical slide that
resembles a real tank or thermometer instrument.

Use as an indicator to display that a condition is


met. LabVIEW turns the light ON or OFF depending
on whether the condition is met.

Use to display text.

Use to display the location of a file or directory.

A table is a 2D array of strings. Use the String


functions to manipulate tables.

The waveform graph displays one or more plots


of evenly sampled measurements. The
waveform graph plots only single-valued
functions, as in y = f(x), with points evenly
distributed along the x-axis, such as acquired
time-varying waveforms.

8
The XY graph is a general-purpose, Cartesian
graphing object that plots multivalued functions,
such as circular shapes or waveforms with a
varying time base. The XY graph displays any
set of points, evenly sampled or not.

C. Procedure C
Table C. Front Panel and Block Diagram windows SubVI
for the sum and average of three numerical values

9
D. Procedure D
Table D1.a Front Panel and Block Diagram windows
for the area and perimeter of a Square
Front Panel Block Diagram

Table D1.b Front Panel and Block Diagram windows


for the area and perimeter of a Rectangle
Front Panel Block Diagram

Table D1.c Front Panel and Block Diagram windows


for the area and circumference of a Circle
Front Panel Block Diagram

10
Table D1.d Front Panel and Block Diagram windows
for the area and perimeter of a Right Triangle
Front Panel Block Diagram

Table D1.e Front Panel and Block Diagram windows


for the area and perimeter of a Penatagon
Front Panel Block Diagram

Table D2.a Front Panel and Block Diagram windows


for the volume and surface area of a Cube
Front Panel Block Diagram

11
Table D2.b Front Panel and Block Diagram windows
for the area and perimeter of a Rectangular Parallelepiped
Front Panel Block Diagram

Table D2.c Front Panel and Block Diagram windows


for the area and perimeter of a Sphere
Front Panel Block Diagram

Table D2.d Front Panel and Block Diagram windows


for the area and perimeter of a Cone
Front Panel Block Diagram

12
Table D2.e Front Panel and Block Diagram windows
for the area and perimeter of a Right Circular Cylinder
Front Panel Block Diagram

7.Conclusion:
I therefore conclude that I have learned so much functions and to make programs using LabVIEW. Some
are the use of different controls, functions and indicators available for the Input, Process and Output of
LabVIEW which can be programmed in Vis(virtual instruments).
8. Further Readings:
Seborg Dale E., Edgar, Thomas F., and Mellichamp Duncan A. (2004). Process Dynamics and
Control. Singapore: Wiley.
Knopf, F. C. (2012). Modeling, analysis and optimization of process and energy systems.Hoboken,
New Jersey: John Wiley and Sons.
Velten, K. (2009). Mathematical modeling and simulation: introduction for scientists and engineers.
Singapore: Wiley-VCH.

13
9. Assessment (Rubric for Laboratory Performance):
TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES
RUBRIC FOR MODERN TOOL USAGE
(Engineering Programs)
Student Outcome (e): Use the techniques, skills, and modern engineering tools necessary for engineering
practice in complex engineering activities.
Program: Chemical Engineering Course: CHE 506 Section: _______ ____Sem SY ________
Performance Unsatisfactory Developing Satisfactory Very Satisfactory Score
Indicators 1 2 3 4
1. Apply Fails to identify Identifies Identifies modern Recognizes the
appropriate any modern modern techniques and is benefits and
techniques, techniques to techniques but able to apply constraints of
skills, and perform fails to apply these in modern
modern discipline- these in performing engineering tools
tools to specific performing discipline-specific and shows
perform a engineering discipline- engineering task. intention to apply
discipline- task. specific them for
specific engineering engineering
engineering task. practice.
task.
2. Demonstrate Fails to apply Attempts to Shows ability to Shows ability to
skills in any modern apply modern apply fundamental apply the most
applying tools to solve tools but has procedures in appropriate and
different engineering difficulties to using modern effective modern
techniques problems. solve tools when solving tools to solve
and modern engineering engineering engineering
tools to problems. problems. problems.
solve
engineering
problems.
3. Recognize Does not Recognizes Recognizes the Recognizes the
the benefits recognize the some benefits benefits and need for benefits
and benefits and and constraints of and constraints of
constraints constraints of constraints of modern modern
of modern modern modern engineering tools engineering tools
engineering engineering engineering and shows and makes good
tools. tools. tools. intention to apply use of them for
them for engineering
engineering practice.
practice.
Total Score
Mean Score = (Total Score / 3)
Percentage Rating = (Total Score / 12) x 100%
Evaluated by: Engr. Crispulo G. Maranan June 31, 2017
Printed Name and Signature of Faculty Member Date
14
15

Das könnte Ihnen auch gefallen