Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
III
ME 241 Spring 2014
Calibration
Connecting to the world
Building a calibration VI
ME 241 Spring 2014
ME 241 Spring 2014
Basic idea is to measure the output of a sensor for known input values.
Input value is an independent variable Sensor output is a dependent variable
Determine functional relationship between these
two (“Calibration curve” - generally use a straight line).
Then, during actual measurement, can determine the input value from the sensor output.
ME 241 Spring 2014
Calibration Measurement
ME 241 Spring 2014
Set known pressure by adjusting height of water in tank “Input”
Read voltage from sensor “Output”
sensor
Read voltage from sensor, determine pressure in pipe using calibration curve.
Calibration Measurement
ME 241 Spring 2014
Pressure
Voltage
Apply (known) pressure, measure voltage
Pressure
Voltage
Measure voltage, determine (unknown) pressure
Can use LabVIEW to collect the data necessary to build a calibration curve.
Will use this as an example of how you can use LabVIEW to collect experimental data
For classroom use we will simulate the voltage output from the sensor using a power supply.
ME 241 Spring 2014
ME 241 Spring 2014
ME 241 Spring 2014
LabVIEW “Taking a measurement” video from NI website.
Pressure gage USB6009 DAQ
hardware software
1
ME 241 Spring 2014
Differential vs. referenced single end (RSE) (channel 0, for example)
signal
+
-
AI0
AI4
differential
signal
AI0
GND
RSE
+
-
Look at your ADC (the USB 6009)
Your USB 6009 has been prewired for you in differential mode.
ME 241 Spring 2014
You should all have a NI USB 6009. Make sure you are looking at the correct side.
For RSE (includes ground)
For differential
ME 241 Spring 2014
In order for the DAQ Assistant to configure properly, it must be able to look at your ADC.
Plug the 6009 into your computer using the USB.
ME 241 Spring 2014
Pressure gage USB6009 DAQ
hardware software
1 2
ME 241 Spring 2014
ME 241 Spring 2014
1) Control to input the pressure value In the real world this will be known pressures (from
height of water in tank). Here we will give you the values.
2) DAQ Assistant to input the voltage from the sensor In the real world this will be output from the pressure
sensor. Here they will be from a power supply.
3) Indicator so we can see the data as we collect it.
4) Write to Measurement File - a way to output the data to a file so we can save it.
ME 241 Spring 2014
Add DAQ Assistant to Block Diagram ◦ Functions Palette Express
Input
Needs to be configured based on the input device and the type of data we collect.
A dialogue box will automatically open when we place the DAQ Assistant ◦ can also double click on icon
later to set-up or change
Configuring the DAQ will add appropriate terminals etc. on the block diagram
ME 241 Spring 2014
Choose Acquire signals
Analog input
Voltage
ME 241 Spring 2014
Choose a0
ME 241 Spring 2014
one channel
one sample
ME 241 Spring 2014
Add a Write to Measurement File to Block Diagram ◦ Functions Palette File I/O
Also needs to be configured.
A dialogue box will automatically open when we place the Write to Measurement File ◦ can also double click on
icon later to set-up or change
ME 241 Spring 2014
adds each data pair
to the file
ME 241 Spring 2014
Numerical control to enter the value of the independent variable
Text (file path) control to designate the file where the data will be written
Button control to turn data collection on and off
Two numerical indicators to display the values of the independent variable (as a double check on entry) and dependent variable (to make sure data is being acquired)
Add a text label if you’d like
ME 241 Spring 2014
ME 241 Spring 2014
Merge signals: under Express, Sig Manip
Try creating the file name and enable controls by right clicking over the Write to Measurements terminal and using create
Pressure gage USB6009 DAQ
hardware software
1 2 3
ME 241 Spring 2014
Finally need to connect the output of the measuring device to the desired channel on the 6009 ADC.
We are using differential channel 0 (AI0, AI4), so we want to connect our two wires there.
For the workshop: ◦ Have already connected wires to AI0, AI4 channel 0.
[may also be wired for channel 2 (AI4, AI6)] ◦ Just connect the matching BNC connector to “A” on the
desktop (this will connect the two wires into the power source or signal generator at the front of the classroom)
ME 241 Spring 2014
1) Set a value of the independent variable (e.g. by pouring the correct level of water into a tank to set the pressure.)
2) Enter the value of the independent variable on the front of your VI.
3) Make sure the Enable button is pressed. (Write to file is active.)
4) Press the run key. 5) The VI collects the values of the independent variable
(you entered on the front panel) and the dependent variable (voltage from the measurement system). These are displayed on the front panel and sent to the file.
6) Repeat. Each time one new set of data (x, y) is added to the data file.
ME 241 Spring 2014
C-drive —> Users —> YourName —> MyDocuments > LabVIEW Data
Where is it??
ME 241 Spring 2014
ME 241 Spring 2014
ME 241 Spring 2014
ME 241 Spring 2014
ME 241 Spring 2014
ME 241 Spring 2014
y = 1.0006x - 0.0224
R² = 0.9999 0
2
4
6
8
10
0 5 10
ind
ependent
vari
ab
le
(un
its)
dependent variable (units)
Does it matter which axis is which in the plot?
ME 241 Spring 2014
Your calibration VI
Your data
ME 241 Spring 2014
You can now program in LabVIEW.
ME 241 - Level III
ME 241 Spring 2014