How to Use Thermocouples with an SCXI-1102 Module NATIONAL INSTRUMENTS

Application Note 076
NATIONAL
INSTRUMENTS
®
The Software is the Instrument
®
How to Use Thermocouples with an
SCXI-1102 Module
This application note describes how to set up and use the SCXI-1102 with thermocouples. It also describes the
example programs that use the SCXI-1102 to make thermocouple measurements. These example programs are
included on the SCXI Application Examples disk included in the SCXI Getting Started Pack (P/N 777132-01).
You can also download these programs from the National Instruments BBS. These programs, written in
LabVIEW, LabWindows/CVI, and C specifically for the configuration described in this application note, are
easy to understand and use. They serve as a starting point for more complicated programs.
Following the programming instructions, this note includes some useful background information – a brief
description of thermocouple operation and special signal conditioning requirements for thermocouples.
SCXI-1102 Overview
The SCXI-1102 is a 32-channel thermocouple amplifier module. Each of the 32 channels includes a gain
amplifier and lowpass filter. The block diagram in Figure 1 shows the basic function blocks of the SCXI-1102.
Thermocouple
+
–
Filter
Gain
(1 or 100)
Ground
Reference
Buffer
+ Vout to DAQ
board or
– SCXI bus
•
•
•
Input
Protection
•
•
•
32 Channels
Filter
Buffer
Multiplexer
CJ Sensor
SCXI-1303
Terminal
Block
SCXI-1102
Figure 1. Block Diagram of the SCXI-1102
Each input channel includes input protection and a lowpass noise filter with a fixed bandwidth of 1 Hz. Each
channel also includes a software programmable gain amplifier that can be set for a gain of 100 (for
thermocouple and other millivolt signals) or 1 (for ±10 V inputs). The outputs of the 32 amplifiers are
Product and company names are trademarks or trade names of their respective companies.
340998B-01
© Copyright 1997 National Instruments Corporation. All rights reserved.
March 1997
connected to a multiplexer, which passes the conditioned signals to the DAQ board or device, or the SCXI bus
in the backplane of the SCXI chassis.
You connect thermocouples to the SCXI-1102 via the SCXI-1303 or SCXI-1300 terminal blocks, which include
an onboard temperature sensor for cold-junction compensation. Alternatively, you can use the TBX-1303 DINrail-mountable terminal block, and cable the TBX-1303 to the SCXI-1102 with a SH96-96 or R96-96 cable.
The SCXI-1303 and TBX-1303 are recommended for thermocouples because they include isothermal
construction, ground-referencing connections for floating thermocouples, and a high-precision cold-junction
sensor.
Thermocouple Measurement Example
For your convenience, a J-type thermocouple wire is included with the SCXI Getting Started Pack. Use this
thermocouple sensor (or substitute your own thermocouple) in the example described in this note.
This section describes step-by-step how to connect the J-type thermocouple to your SCXI system, configure
and install your SCXI module, and take measurements with the thermocouple. The SCXI Application Examples
diskette includes example programs written in LabVIEW, LabWindows/CVI, and C for this application.
Step 1. Connect The Thermocouple
Wire the thermocouple to channel 0 on your SCXI terminal block. For the J-type thermocouple included with
the SCXI Getting Started Pack, connect the positive (white) lead to the positive channel and the negative (red)
lead to the negative channel. Figure 2a shows the thermocouple connection to the SCXI-1303, and Figure 2b
shows the thermocouple connection to the SCXI-1300.
You do not need to connect the negative terminal to ground on the SCXI-1303 because the negative
connection of each channel on the terminal block is already wired to ground through a bias resistor.
Note:
Most thermocouples, like this one, are floating with respect to ground. For floating
thermocouples, the signal connections of Figure 2 are correct. If, however, the
thermocouples that you will use in your application are not floating, but connected to a
ground point, then a) if you are using the SCXI-1303, disable the ground-referencing
circuitry on the SCXI-1303 (see the SCXI-1303 Terminal Block Installation Guide); or b) if
using the SCXI-1300, do not connect the negative lead of the thermocouple to chassis
ground of the SCXI-1300 terminal block. These steps are necessary to prevent the creation
of ground loops.
2
+ (white)
Thermocouple
- (red)
- (red)
Thermocouple
+ (white)
This wire grounds the
thermocouple to the
chassis ground of the
terminal block.
MTEMP
Chassis Ground
MTEMP
a) SCXI-1300
b) SCXI-1303
Figure 2. Connecting a Thermocouple to Channel 0 of the SCXI Terminal Block
Step 2. Assemble Your SCXI System
A. Configure the SCXI-1102 Module and Terminal Block—Most configuration
settings of the SCXI-1102 are set via software. The SCXI-1102 does include
one jumper, W1, which you should leave in the factory-default position
(position P). You do not need to modify the setting of W1 jumper unless you
are daisy-chaining multiple SCXI chassis and a cable is attached directly to
the SCXI-1102.
Note:
The SCXI-1300 and SCXI-1303 include a jumper to select the MTEMP or DTEMP channel
for the cold-junction sensor input. When used with the SCXI-1102, the position of this
jumper is irrelevant; MTEMP and DTEMP are connected internally in the SCXI-1102.
B. Insert the SCXI-1102 module into your SCXI chassis.
C. Cable SCXI module to your DAQ board—If you are using a plug-in DAQ
board, connect the SCXI-1102 to your DAQ board using the appropriate
SCXI-134X cable assembly.
If you are using the SCXI-1200 module, install the module into your SCXI
chassis and connect the SCXI-1200 to the parallel port of your PC, using the
cable included in the SCXI-1200 kit.
D. Attach terminal block—Finally, plug the SCXI-1300 or SCXI-1303 terminal
block onto the front of the SCXI-1102 module.
3
Finally, power up your SCXI chassis and computer. Figure 3 shows the
components of an SCXI system cabled to a DAQ board.
For more complete information on how to set up an SCXI system (multiple modules, configuration of different
types of modules, and so on.), refer to the Getting Started with SCXI manual.
S
C
X
I-
1
0
0
1
S
M
C
AI
SC
NF
XI
X
I
RA
11
M
E
00
Thermocouple
SCXI-1303 or
SCXI-1300
Terminal Blocks
SCXI Chassis
SCXI-1102
Module
SCXI
Cable
Assembly
DAQ Board
Figure 3. SCXI-1102 System Diagram (with DAQ Board)
Step 3. Configure Your Software
Note:
If you are using a plug-in DAQ board, and have not installed and configured the board, you
should do so now. Refer to your hardware user manual for instructions.
To configure your sytem software, first make sure that you have installed NI-DAQ software. Refer to your
NI-DAQ manual for detailed installation instructions.
After you install NI-DAQ software, run either wdaqconf.exe for Windows or NI-DAQ Utilities for Mac OS; then
configure your DAQ board and SCXI chassis. The following figures show configuration settings for Windows.
Run the appropriate configuration utility, selecting the parameters shown below. The following figures include
an AT-MIO-16E-2; your device may differ.
4
The Windows system settings are shown below:
2. Click on the SCXI
menu to open the
SCXI Configuration
window.
1. Configure your
plug-in DAQ board
(if used) as device
number 1.
1. Select your chassis type.
These settings will be set automatically for you.
2. Select chassis slot 1.
3. Select the SCXI-1102 module.
4. Click here to
configure Module 1.
1. Select your DAQ board
(Dev #1).
5. Save your settings.
2. Select your terminal block.
3. Set channel to 0.
4. Set gain to 100.0.
5
The Macintosh system settings are shown below.
1. Click here and choose
SCXI configuration.
1. Select your chassis type.
2. Select the SCXI-1102 module.
3. Select your DAQ board.
4. Select chassis slot number.
5. Choose multiplex mode.
6. Set gain to 100.
7. Set channel to 0.
6
Step 4. Run the Program Example
A diskette labeled SCXI Application Examples is included in the Getting Started with SCXI pack. This diskette
includes three example programs written to illustrate the use of the SCXI-1102 with thermocouples. The three
example programs are written using LabVIEW, LabWindows/CVI, and C programming language.
Each of the example programs perform the measurement of the J-type thermocouple and displays the
temperature reading in degrees Celsius. Below is a general flow chart of the example programs that shows the
fundamental steps in programming the SCXI-1102 for thermocouples.
Start
Read
Cold-Junction
Temperature Voltage
(CJTEMP)
Read
Thermocouple
Voltage
Convert Thermocouple
Reading to Temperature
Units
Plot
Temperature
Yes
Read
Again
No
Stop
Figure 4. Flow Chart of Programming the SCXI-1102 for Thermocouple Measurement
The SCXI Applications Example diskette includes several basic programming examples, including three that
illustrate the use of the SCXI-1102 with thermocouples in three different programming environments.
•
LabVIEW Example: 1102tc.vi
File Location: a:\labview\1102\1102tc.vi (on SCXI Applications Examples diskette)
•
LabWindows/CVI Example: 1102tc.prj
File Location: a:\cvi\1102\1102tc.prj (on SCXI Applications Examples diskette)
7
•
C Language Example: 1102tc.c
File Location: a:\c_ex\1102\1102tc.c (on SCXI Applications Examples diskette)
Thermocouple Overview
A thermocouple is created whenever two dissimilar metals touch and the contact point produces a small opencircuit voltage that varies as a function of temperature. This thermoelectric voltage is known as the Seebeck
voltage and is nonlinear with respect to temperature. However, for very small changes in temperature, the
voltage is approximately linear and can be expressed in the following equation:
∆V = S∆T
where ∆ V is the change in voltage, S is the Seebeck coefficient, and ∆ T is the change in temperature.
S varies with changes in temperature, causing the output voltages of thermocouples to be nonlinear over their
operating ranges.
Several types of thermocouples are generally available; these thermocouples are designated by capital letters
that indicate their composition according to American National Standards Institute (ANSI) conversions. For
example, the J-type thermocouple included in this package consists of one iron wire and one constantan
(a copper-nickel alloy) wire.
Signal Conditioning Considerations
When using thermocouples, you should be aware of several measurement issues such as the following:
•
Cold-junction compensation
•
Nonlinear data
•
Low-voltage signals
•
Noisy signals
Cold-Junction Compensation
When you connect a thermocouple wire to your terminal block, you create one or two additional
thermocouples where the sensor wire contacts the terminal. You must account for the voltage generated at this
junction, called the cold junction. Use the following equation:
V TC (T TC) = VMEAS + VTC (T cjc)
where V MEAS is the thermocouple voltage measured by your data acquisition (DAQ) system, V TC (T cjc) is the
cold-junction voltage at the terminal block, and V TC (T TC) is the compensated thermocouple voltage that you
can scale to temperature units.
First, measure the temperature of the cold junction, T cjc, and use this reading to calculate V TC (T cjc). The
SCXI terminal blocks include a special cold-junction temperature sensor for this purpose. The first thing that
your temperature measurement program does is take a reading of the cold-junction temperature sensor. If you
are using the SCXI-1300, this sensor is an IC temperature sensor, which outputs 10 mV/˚C.
The SCXI-1303 isothermal terminal block includes a high-precision thermistor temperature sensor that outputs
1.91 V at 0˚ C to 0.58 V at 55˚ C. Because the thermistor output is nonlinear, you must use a thermistor
linearizing function to convert the measured voltage to temperature. National Instruments software supplies
you with a function to linearize thermistor outputs.
After you determine the cold-junction temperature, your software must convert this temperature into the
voltage for the appropriate thermocouple type. National Instruments conversion functions include thermocouple
8
temperature-to-voltage routines for this conversion. You can also use standard look-up tables or polynomials
listed in National Institute of Standards and Technology (NIST) NBS Monograph 175.
Finally, add the voltage, V TC (T cjc), to your measured thermocouple voltage, V MEAS, to yield the compensated
thermocouple voltage, V TC (T TC).
Nonlinear Data
After determining the compensated thermocouple voltage, you must convert this voltage into temperature
units. The voltage-temperature relationship of thermocouples is very nonlinear. To convert the nonlinear
voltage readings into temperature values, you can use either look-up tables or the following polynomial
equation:
T = a0 + a1x + a2x2... + anxn
where T is the temperature in degrees Celsius, x is the thermocouple voltage in volts, and a0 through an are
coefficients that are specific to each thermocouple type. National Instruments software provides thermocouple
linearization functions that use this polynomial equation.
Low-Voltage Signals
Thermocouples generate low-voltage signals, typically in the millivolt range. For example, a J-type
thermocouple outputs –8.1 mV at –210˚ C and 21.8 mV at 400˚ C. Therefore, you must amplify the signal to
accurately read and digitize it. The SCXI-1102 has programmable gain amplifiers that can be programmed for
a gain of 1 or 100. This amplification yields an input voltage range of ±10 V or ±100 mV. This gain can be
combined with gain on the DAQ board or module for higher amplification. For example, an AT-MIO-16E-2
configured for a gain of 5 and an SCXI-1102 configured for a gain of 100 yields an input range of ±20 mV.
Noisy Signals
•
Low-voltage signals are susceptible to noise corruption. Thermocouple wire acts as an antenna and picks
up stray electromagnetic signals in the environment. The most common sources of stray electromagnetic
waves are power lines, electric motors, and computer monitors. Poor grounding of your system also
produces noise. Use the following methods to diminish the effects of noise on your thermocouple.
•
Use a shielded cable from the SCXI chassis to the plug-in DAQ board and apply extra shielding to your
thermocouple wire.
•
Use lowpass noise filters to attenuate high-frequency noise. The SCXI-1102 includes 1 Hz lowpass filters
on every channel to maximize rejection of 50 Hz and 60 Hz noise.
•
Use the SCXI-1102 programmable gain instrumentation amplifiers (PGIA) to amplify the signal and
increase the noise immunity before the signal leaves the SCXI module.
•
Make sure you have only one point of ground for your thermocouple circuit.
•
In extreme cases, you may find it helpful to average your thermocouple voltage readings to improve noise
rejection. For example, acquire 100 samples from a single thermocouple and use the average value of all
the samples as one data point.
9