MAE 1502 Lab 3 – Data Acquisition

advertisement
MAE 1502
Lab 3 – Data Acquisition
Objectives
By the end of this lab, students will be able to
1.
2.
3.
4.
Configure a data acquisition device (DAQ)
Construct a virtual instrument (VI) in LabVIEW
Take measurements using LabVIEW
Extra: export data from LabVIEW
Equipment
In A306:
Liquid-in-glass thermometer
K-type thermocouple probe
DAQ
Computer with LabVIEW
500 mL beaker
Heating plate
Instructions
Follow instructions carefully. The VI must often be constructed in a particular order.
RC = right click.
Part 1 – Connecting DAQ and thermocouple
1. Take out the DAQ and connect to the computer using the USB cable included.
The green light will blink.
2. Connect the probe to the DAQ by connecting to the Analog ports 2 and 3.
Red
= +, goes into port 2 (AI0+)
Blue = - , goes into port 3 (AI0-)
Part 2 – Construction of VI
3. Open LabVIEW 2011 (All Programs≫National Instruments≫LabVIEW 2011)
4. Start a Blank VI
5. Window≫Tile left and right.
The left side is the Front Panel, which is like the front of a machine.
It is where you would push buttons, change input options, and read the output.
The right side is the Block Diagram. It represents the inside of the machine.
It is where we tell the VI how to obtain data, and what to do with it.
6. On the Block, RC≫Express≫Input≫DAQ Assist.
Place the DAQ Assistant toward the top left of the Block.
7. A Create New…window will open.
Acquire Signals≫Analog≫Temperature≫Thermocouple
Select ai0 in the next window, and then hit Finish.
8. We now need to configure the DAQ for the thermocouple.
Measure room temperature using the thermometer.
Configure as shown below, using your room temperature as the CJC Value.
9. After hitting OK, a window will pop up asking if you want to create a loop. Hit Yes.
Your Block will now look like:
10. In the Front Panel. RC≫Graphical Indicators≫Chart. Place in the centre of the Front Panel.
11. In the Block, enlarge the While Loop, shift the stop symbol and connect the chart as shown
below:
12. Hit the “Run” button on either the Front Panel or the Block.
The chart will update each second with 3 new measurements.
You will notice that it is not very consistent or accurate.
13. Estimate the average temperature from the chart. Record this value.
Hit the “Stop” button.
To calibrate the signal, we could:
Take many measurements and average them.
Adjust the output to match room temperature by adding a constant.
Part 3 – Measure boiling point of water
14.
15.
16.
17.
18.
19.
20.
21.
Heat 500 mL of water until it begins to boil.
Place the thermometer into the water.
Time how long it takes the thermometer to reach a steady value.
Record the temperature of the boiling point of water.
Place the thermocouple into the water. Run the VI continuously.
Time how long it takes the thermocouple to reach a steady value (approximately steady…)
Estimate the average temperature from the chart. Record this value.
Calculate the temperature difference ΔT between room temperature and the boiling point
of water for the thermometer and the thermocouple.
22. Calculate the percentage that ΔT of the thermocouple differs from the ΔT of the
thermometer?
Part 4 – Making the output look pretty
23. On the Front Panel, RC on the chart.
Replace≫Modern≫Numeric≫Thermometer.
RC on the thermometer, resize it to look a little bigger!
Your Front Panel will now look like 
Part 5 – Extra – Export data
24. Block≫RC≫Express≫Output≫Write Measurement File.
Configure as shown below:
Main page first…adjust Filename to a folder on the desktop for ease.
Click on “Settings…” and configure as shown below.
25. On the Block, hover the mouse near the connection between the DAQ Assistant and the
Chart. Once the cursor changes to be spool of wire, click and connect to the left of the
Signals input on the Write To Measurement File box.
26. Run the VI, stop after about 10 seconds.
27. Open the data file created using Notepad. It will contain a time column and a temp column.
28. This data can be copied and pasted into Excel or imported into Matlab for the purposes of
data analysis.
Download