Lab 1 - City Tech OpenLab

advertisement
Department of Electrical &
Telecommunication Engineering
EET-3120/E260
Sensors and Instruments
Lab # 1
Introduction to LabViIEW and NI ELVIS II
Name of the Students:
E-Mail:
Group Members
Section:
Date:
Submitted To:
0|Page
Faiz Rasool
Faiz.Rasool@mail.citytech.cuny.edu
Jonathan Rivera
Yivan Cortorreal
35142
02/19/2015
Vivian Vladutescu
Table of Content
Objective
2
Equipment
2
Theory
3
Procedure
4
Experimental Results
5-7
Analysis
8
1|Page
Equipment:

Computer.

Lab View software.
Objective:
In this experiment we will be familiarize with the graphical programming in Lab View.
Because programming in Lab VIEW is very different from programming in one of the classical
text-book programming languages. A Lab VIEW program is very similar to a logical scheme in
which graphical blocks are used instead of text.
2|Page
Theory:
Lab VIEW programs are called virtual instrument, or VIs, because their appearance and
operation imitate physical instruments, such as oscilloscopes and multimeters. Lab View
contains a comprehensive set of tools for acquiring analyzing, displaying, and storing data, as
well as tools to help you troubleshoot your code.
Lab View VIs contains three components-the front panel, the block diagram, and the icon
and connector pane. This lesson describes the front panel and block diagrams.
In Lab VIEW, you build a user interface, or front panel, with controls and indicators.
Controls are knobs, push buttons, dials, and other input device. Indicators are graphs, LEDs, and
other displays. After you build the user interface, you add code using VIs and structures to
control the front panel objects. The block diagram contains this code. In some ways, the block
diagram resembles a flowchart.
Figure 1.1 shows the typical programming of Lab VIEW on Front Panel & Block Diagram Panel
3|Page
Procedure:
a. Open the Controls Palette from the pull-down menu by selecting View » Controls Palette,
or press the right mouse button in the Panel window.
b. Select a Numeric Control from Express » Numeric Controls, place it on the Panel, and all
it b (write the b character in the control label—the black area above the control that
contains the “Numeric” word).
c. Repeat the preceding step and call the new control a.
d. Select a Numeric Indicator from Express » Numeric Indicators, place it on the Panel on
the right side of the controls, and call it x. Notice that all three objects from the Panel
have a corresponding object in the Diagram. Next, build the application Diagram.
e. Activate the Diagram window by pressing the left mouse button inside of the Diagram
window, or select the option Show Block Diagram from the pulldown menu: Window.
f. Open the Functions Palette from the pull-down menu View, or press the right mouse
button in the Diagram window.
g. Select the Negate function from Express » Arithmetic & Comparison » Express Numeric
and place it in the Diagram window.
h. Select the Divide function from Express » Arithmetic & Comparison » Express Numeric
and place it in the Diagram window.
i. Connect the b icon with the x terminal of the Negate function using the Connecting tool,
Pass over the b icon with the mouse pointer until this pointer takes the connecting tool
form. When that happens, press the left mouse button once and move the mouse over the
x terminal of the Negate function until the terminal starts blinking. Then press the left
mouse button once. If the connection is successful, the wire will have an orange color.
j. Connect all terminals. When all the connections are successful, the application is
finished.
Running the application.
k. Before running the application it is necessary to introduce the values for the equation
coefficients a and b. For this, activate the Panel window by clicking on the left mouse
button on the Panel window or by selecting Show Panel from the Window pull-down
menu. Pass the mouse pointer over the b control in the Panel window until the pointer
takes the operating tool form. Press on the b control arrows until you receive the desired
value. Repeat the operation for the control.
l. Run the application. Press the Run button from the toolbar, Notice the results shown in
the x indicator.
m. Change the values for the b and a, and run the application again.
n. Save the application as “First-degree equation.vi” using the Save As option from the File
pull-down menu.
4|Page
Experimental results:
 first Virtual Instrument in LabVIEW
By using control Platte I got the Numeric Control from Express>>Numeric Control to built my
block diagram
Fig 1.2 Numeric Indicator Platte Numeric indicators are the simplest way to enter and display
numeric data
Then Negate from Express>>Arithmetic & Comparison>>Express Numeric
Figure 1.3 Supplementary controls
5|Page
Run I
We built front panel and block diagram and calculated the t = -(-b)/a and selecting b=3, a=3 we
got t=1 as shown in fig 1.4 below
Figure 1.4 . The panel and diagram for solving first-degree equation.
We plugged in values for X1=4, X0=2 and V=2. After running the program we discovered that
a= -1 in box X and repeated the program with different values. There for T=1
6|Page
Run 2
We built front panel and block diagram and calculated the x = x0+v0t1+(1/2)t2 and
selecting x=1, x0=2, v0=2, t= 2, t1= 2 we got a=2.5 as shown in fig 1.5 below
Figure 1.5
7|Page
x = x0+v0t1+(1/2)t2 , Acceleration calculation, We plugged x=1, x0=2, v0=2, t=
2, t1= 2 and got Ans=2.5 which was the accelration.
Conclusion:
In conclusion, this lab introduces the LABVEIW Suite by showing how students can use
the Lab VIEW to solve the mathematical equations or algebraic equation, and then we compare
the Lab VIEW results with calculated results. In the end this lab was very interesting,
challenging, and educational.
headaches.
8|Page
Also, we can solve any complicated equation without any
Download