Introduction To Labview and Temperature Measurement
Introduction To Labview and Temperature Measurement
Objective
This lab is intended to familiarize you with the LABVIEW software, the data acquisition hardware used in
this class and with temperature measurements using thermocouples. No report has to be written. However,
your effort will be judged by the instructor and counts towards class participation.
At the end of this lab you will understand, how a thermocouple is used to measure temperature, how cold
junction compensation works and how the data is recorded and displayed using data acquisition hardware
and LabVIEW software. You will also understand how signals can be both recorded and generated with a
National Instruments NIcDAQ-9178 for multiple I/O DAQ (Data Acquisition) modules.
Whenever you see this symbol, write the answer to the question into the lab notebook. Use full
sentences and illustrations (where applicable) to answer all questions. Use the appropriate letter to
label each response.
Apparatus
The data acquisition (cDAQ-9178) is an eight slot self-contained Chassis unit designed for multiple
I/O DAQ modules. Notice the unit communicates with the LabVIEW software through a USB
connection located in the back of the computer.
cDAQ-9178
When would you use analog input, analog output, digital input and digital output? Give examples
What is the number of bits used in the Analog to Digital Conversion for the NI 9205?
What is the number of bits used in the Analog to Digital Conversion for the NI9219?
What are the allowable voltage ranges for analog input module NI 9205 and NI9219?
o Which module can be used for thermocouple measurements and what is built into this
module that makes this possible?
Open the device pinout for the NI 9219 (Right click on NI 9219 and select Device Pinouts). Look at
which terminals are physical wired in the 9219 module in front of you. Draw your own diagram
labeling these terminals and the respective channel.
Compare the device pinout with your diagram to determine:
o Which channel is wired for a thermocouple?
o Which channel is wired for a half-bridge strain gauge?
Confirm your answers with the TA. Discuss any open questions you may have!
The next objective is to build a simple data acquistion system, which can be used to measure temperature
with a thermocouple.
1. Assemble hardware
Connect a K-type thermocouple to the thermocouple
connector on the junction board.
Input → Temperature → Thermocouple. The system will analyze which input channels support
thermocouples. Since thermocouples produce an electric voltage, any analog in channel could be
used. Select the channel that you determined was wired for a thermocouple and press Finish.
Demonstrate your work and VI to the TA. Discuss any open questions you may have.
Make sure you have a functional VI and save your work as TempVI.
The next step builds on the temperature VI. So far, you have learned, how to record an analog signal (Analog
In). Now we will add an output signal. The data acquisition board can not only be used to record signals but
it can also produce signals as output (Analog Out or Digital Out). The analog out feature is used to adjust
the voltage to a light bulb through a “virtual dimmer switch” and thus adjust the heat output from the light
bulb.
3. Assemble hardware
3.1 Connect a thermocouple to the thermocouple connector on the junction board, if not already
assembled.
4.2 Add an Analog Out Channel: Go to the block diagram panel, right click inside the “while loop”
container and add a DAQ assistant (Express → Input → DAQ Assist). Select Generating Signals →
Analog Out → Voltage. The window on the right appears. Choose ao0, the analog out channel 0 as
output. Click Finish.
4.3 Configure Analog Out Channel: Set the signal output range to 0 to 5V. This is the voltage range,
which will be used to control the “dimmer” transistor. Select 1 sample on demand for task timing.
Click “Ok”.
4.4 Review block diagram: The block diagram should be similar to the one below with a second DAQ
Assistant added. This DAQ block can now be used to provide an output voltage on Analog Out
AO0.
Demonstrate your work and the VI to the TA. Discuss any open questions you may have!
Make sure you have a functional VI and save your work as LightBulbDimmerVI.
5.2 Add a Digital Out Channel: Add another DAQ Assist to the block diagram and configure it as
Digital Line out, NI-9472, Channel 0.
5.3 Add a Fan Switch: Go to the front panel, right click and select Boolean → Pushbutton. Rename it
“Fan Switch”.
5.4 Wire the Switch to the Digital Out: Go back to the block diagram and run a wire from the fan
switch to the DAQ Assist block. Note that the wire appears to be broken. This is because the output
from the fan switch is a Boolean, while the input to the digital out channel is a 1D Boolean array
(on/off). In order to fix the wire, right click on the wire and select Insert → All Pallets → Array →
Build Array. This converts the Boolean to a 1D Array. Compare your VI to the VI shown below.
5.5 Run the VI: Start the VI and press the Fan Switch. The fan should come on. Turn the light bulb on
and heat the thermocouple. Turn the fan on/off and watch as the temperature changes due to the
cooling effect of the thermocouple.