Escolar Documentos
Profissional Documentos
Cultura Documentos
Measurement Hardware
Tutorial
Introduction
Today, most engineers and scientists use personal computers with
expansion buses for laboratory research, industrial control, test, and
measurement. Obtaining proper results from a PC-based
measurement system depends on the quality and performance of
each of the following system elements
Transducers
Signal conditioning
Measurement hardware
Software
Personal computer or industrial computer
Measurement
and Analysis
Hardware
SCXI-10
01
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
1140
SCXI
MAINFRAME
Transducers
Signal
Conditioning
Personal
Computer
Software
Sensor
Electrical Characteristics
Thermocouple
Parasitic thermocouples
Low-voltage output
Low sensitivity
Nonlinear output
Resistance output
Low resistance (100 , typical)
Low sensitivity
Nonlinear output
Resistance output
High resistance and sensitivity
Drastically nonlinear output
High-level voltage or current output
Linear output
Resistance output
Low resistance
Very low sensitivity
Nonlinear output
Cold-junction compensation
High amplification
High resolution
Linearization
Current excitation
4-wire/3-wire configurations
High resolution
Linearization
Voltage or current excitation
Reference resistor
Linearization
Power source
Moderate gain
Excitation
Bridge configuration
3-wire connection
Linearization
Transducers
Transducers convert physical phenomena into electrical signals. For
example, thermocouples, RTDs, thermistors, and IC sensors convert
temperature into a voltage or resistance. Other examples include
strain gauges, flow transducers, and pressure transducers, which
convert force, rate of flow, and pressure to electrical signals. In each
case, the electrical signals produced vary according to the physical
parameters they monitor.
Measurements
Signal Conditioning
Transducer outputs must often be conditioned to provide signals
suitable for the measurement device. Signal conditioning is found in
many different physical forms such as dedicated signal conditioning
modules, conditioning built into the measurement device (such as a
digital multimeter), and probes used with oscilloscopes. Signal
conditioning accessories amplify low-level signals, isolate, filter, excite,
and provide bridge completion to produce appropriate signals for the
measurement device.
A thermocouple, for example, combines dissimilar metals to
generate voltages that vary with temperature. Thermocouple outputs
are low-level signals and change only 7 to 40 V for every 1 C
change in temperature. Accurate temperature measurements,
therefore, require a signal conditioning system that accurately
amplifies the signal with high gain and little noise and distortion.
Thermocouple measurements also need cold-junction compensation.
This compensation corrects for voltages that form at the connection of
244
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
Thermistor
IC Temp. Sensor
Strain Gauge
Sampling Considerations
Nyquist Theorem
According to the Nyquist theorem, your minimum sampling rate must
be twice the rate of the highest frequency component in the signal
you are sampling. The frequency at one-half the sampling frequency
is referred to as the Nyquist frequency. Theoretically, it is possible to
recover information about signals with frequencies at or below the
Measurement Hardware
Tutorial
Simultaneous Sampling
Channel 1
Tutorial
Channel 2
Adequately Sampled
Interval Scanning
Channel 1
Channel 2
+2 V
0V
Bandwidth
+1/2 V
0V
1/2 V
1 V
2 V
Input Signal
Instrument
Measured Signal
Channel 1
Channel 2
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
Measurements
+1 V
Continuous Scanning
245
Tutorial
Measurement Hardware
Tutorial
Frame 1
Frame 2
Frame 3
Trigger Level
Input Signal
Sample Times
t2
t3
t1
t2
t3
Measurements
Amplitude
10.00
8.75
7.50
6.25
111
110
101
16
011
Therefore, the theoretical code width of one bit in the digitized value
is 1.5 V.
010
001
000
0
0
20
40
60
80
100
246
Range
Range refers to the minimum and maximum voltage levels that the
ADC can span. National Instruments offers digitizers with selectable
ranges so that the device is configurable to handle a variety of
different voltage levels. With this flexibility, you can match the ADC
range to that of the signal to take advantage of the resolution
available to accurately measure the signal.
10 V
= 1.5 V
100 x 2
100
5.00
3.75
2.50
1.25
Resolution
The number of bits that the ADC uses to represent the analog signal is
the resolution. The higher the resolution, the higher the number of
divisions the voltage range is broken into, and therefore, the smaller
the detectable voltage change. Figure 6 shows a sine wave and its
corresponding digital image as obtained by an ideal 3-bit ADC. A 3-bit
converter divides the analog range into 2 , or 8 divisions. Each division
is represented by a binary code between 000 and 111. Clearly, the
digital representation is not a good representation of the original
analog signal because information was lost in the conversion. By
increasing the resolution to 16 bits, however, the number of codes
from the ADC increases from 8 to 65,536, so you can obtain an
extremely accurate digital representation of the analog signal if the rest
of the analog input circuitry is properly designed.
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
120
140
Measurement Hardware
Tutorial
APPARENT DIGITIZED STRAIGHT LINE
24576
0.75
16384
0.50
32768
8192
0
-8192
-16384
Tutorial
32768
.
.
.
1.00
0.25
0.00
0.5 LSB
-0.25
-0.50
-0.75
-24576
-32768
-10.0
-7.5
-5.0
-2.5
0.0
2.5
5.0
7.5
10.0
Input Voltage
-1.00
.
.
. -10.0
-32768
-7.5
-5.0
-2.5
0.0
2.5
5.0
7.5
10.0
Input Voltage
Figure 7. You can determine the relative accuracy of a measurement device by taking the apparent straight line digitized response
(Figure 7a), which comes from sweeping through the input ranges of the board and plotting the corresponding output codes,
and subtracting a true straight-line fit between the endpoints. Figure 7b shows the results, which show that relative accuracy of
the board is 0.5 LSB.
this does not mean that you can sample all 16 channels at 100 kS/s
and still get 16-bit accuracy. For example, you can purchase products
on the market today with 16-bit ADCs and get less than 12 bits of
useful data. To determine if your board gives you the desired results,
you should scrutinize the specifications. National Instruments offers
several application notes, available at ni.com, to help you understand
all the specifications. See page 258 for more information on
specifications. While evaluating digitizers, consider the differential
nonlinearity (DNL), relative accuracy, settling time of the
instrumentation amplifier, noise, and absolute accuracy specifications.
National Instruments provides this information in accuracy tables and
detailed specifications.
Relative Accuracy
Relative accuracy is the measure in LSBs of the worst-case deviation
from the ideal digitizer transfer function of a straight line. You can
determine relative accuracy of a digitizer by sweeping an applied
voltage from the negative to positive full scale voltage and digitizing it
and plotting the digitized results in an apparent straight line (see
Figure 7a). If, however, you subtract an actual calculated straight-line
Noise
Values different from the actual signal that appear in the digitized signal
are called noise. Because noise is everywhere in the environment,
acquiring data on a measurement device requires careful layout by
skilled analog designers. Simply placing an ADC, instrumentation
amplifier, and bus interface circuitry on a one or two-layer board will
most likely result in a noisy digitizer. Designers can use metal shielding
on a digitizer to help reduce noise. Proper shielding should be added
around sensitive analog sections on a digitizer, and also must be built into
the layers of the digitizer with ground planes.
Figure 8 shows the DC noise plot of two measurement products, both
of which use the same ADC. Two qualities of the digitizer can be
determined from the noise plots the range of noise and the distribution.
The plot in Figure 8a, which describes the NI AT-MIO-16XE-10
16-bit digitizer, has a high distribution of samples at 0 and a very small
number of points occurring at other codes. The distribution is Gaussian,
which is what is expected from random noise. From the plot, the peak
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
Measurements
from the digitized values and plot the resulting points, as shown in
Figure 7b, you see a deviation from zero. The maximum deviation
from zero is the relative accuracy of the digitizer. The difference
between relative accuracy and DNL is that relative accuracy takes into
account all nonlinear accumulation as opposed to DNL, which only
measures a subset of the linearity errors in the ADC.
Relative accuracy is important for a digitizer because it ensures that
the translation from the actual voltage value to the binary code of the
ADC is accurate. Obtaining good relative accuracy requires proper
design of both the ADC and the surrounding analog circuitry.
247
1.00E0
1.00E0
1.00E-1
1.00E-1
1.00E-2
1.00E-2
Tutorial
Measurement Hardware
Tutorial
1.00E-3
1.00E-4
1.00E-5
1.00E-6
1.00E-3
1.00E-4
1.00E-5
1.00E-6
1.00E-7
1.00E-7
1.00E-8
1.00E-8
1.00E-9
1.00E-9
-40
-30
-20
-10
10
20
30
40
-40
-30
-20
-10
10
20
30
40
a. NI AT-MIO-16XE-10
b. Competitors Digitizer
Figure 8. Noise plots of two measurement products that have significantly different noise performance even though they use the
same 16-bit ADC. The expected value is to have the distribution as close to zero as possible. Figure 8a is the National Instruments
AT-MIO-16XE-10, which has codes ranging from -3 LSB to +3 LSB. The codes at 3 LSB have less than a 10-4 and 10-7 probability
of occurrence. A non-National Instruments digitizer in Figure 8b has noise as high as 20 LSB, with a probability (10-4) of codes
occurring as much as 15 LSB from the expected value.
noise level is within 3 LSB. The plot in Figure 8b characterizes a noisy
measurement product, built by a National Instruments competitor,
that has a far different distribution. It has noise greater than 20 LSB,
with many samples occurring at points other than the expected value.
For the measurement products in Figure 8, the test was run with an
input range of 10 V and a gain of 10. Therefore, 1 LSB = 31 V, so a
noise level of 20 LSB is equivalent to 620 V of noise.
Acquisition Considerations
Measurements
Triggering Options
One of the biggest challenges of making a measurement is to
successfully trigger the signal acquisition at the point of interest.
Because most high-speed digitizers actually record the signal for a
fraction of the total time, you can easily miss a signal anomaly if the
trigger point is set incorrectly. With sophisticated triggering options
such as trigger thresholds, programmable hysteresis values, and trigger
hold-off, you capture the precise region of interest of the signal.
248
Timing Options
Most of the measurements performed with digitizers are made using
timing created by the digitizer itself. For example, when you set the
acquisition rate to 100 MS/s, the digitizer paces itself to perform one
analog-to-digital conversion every 10 ns. Sometimes, it is beneficial to
pace the measurements by something external to the digitizers.
Consider a case of measuring strain on the shaft of an engine used for
screwing bolts and nuts together, and you want to know what the strain
value was based on the position of the bolt. If you have an encoder
attached to the engine, the output of the encoder specifies position, and
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
you can use this signal to pace your digitizer. Our E Series products are
an example of digitizers you can pace this way.
Buffering and Record Length Options
Record length refers to the amount of memory available for storing
digitized samples for postprocessing or display. On many high-speed
Different Input
Examples and
Signal Source
Input Examples
Differential (DIFF)
+
-
ACH0(+)
V1
ACH0(-)
+
-
+
-
ACH0(+)
V1
+
-
ACH0(-)
ACH0GND
ACH0GND
Ground Referenced
Single-Ended
(RSE)
+
-
ACH
V1
AIGND
+
-
NOT
+
-
V1
RE C
ACH
OMM
+ Vg
ENDED
Nonreferenced
Single-Ended
(NRSE)
+
-
ACH
V1
AISENSE
+
-
+
-
ACH
V1
AIGND
AISENSE
+
-
AIGND
Measurement Hardware
Tutorial
Waveform
Sample A
Waveform
Sample B
Waveform
Buffer/Segment 1
Waveform
Buffer/Segment 2
Stage 1
Waveform Stage 1
(Loops = 3)
Waveform Stage 3
(Loops=1)
Waveform Stage 2
(Loops = 2)
Stage 2
Stage 3
Measurements
of the output signal produced settling time, slew rate, and resolution.
Settling time and slew rate work together in determining how fast
the DAC can change the level of the output signal. Settling time is the
time required for the output to reach the specified accuracy. The
settling time is usually specified for a full-scale change in voltage. The
slew rate is the maximum rate of change that the DAC can produce
on the output signal. Therefore, a DAC with a small settling time and
a high slew rate can generate high-frequency signals, because little
time is needed to change the output to an accurate new voltage level.
An example of an application that requires high performance in
these parameters is the generation of audio signals. The DAC requires
a high slew rate and small settling time to generate the high
frequencies necessary to cover the audio range. In contrast, an
example of an application that does not require fast D/A conversion is
a voltage source that controls a heater. Because the heater cannot
respond quickly to a voltage change, fast D/A conversion is not
necessary. The application will determine the DAC specifications.
Output resolution, similar to input resolution, is the number of bits
in the digital code that generates the analog output. A larger number
of bits reduces the magnitude of each output voltage increment,
thereby making it possible to generate smoothly changing signals.
Applications requiring a wide dynamic range with small incremental
voltage changes in the analog output signal may need high-resolution
voltage outputs. See page 368 for analog output devices.
Tutorial
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
249
Tutorial
Measurement Hardware
Tutorial
and fast digital-to-analog converters (DACs). Both AWGs and FGs can
output standard waveforms such as sine and square waves with highfrequency resolution by using direct digital synthesis (DDS) clocking
mechanisms. AWGs and FGs also provide several triggering modes,
which control the starting and stopping of waveform generation. This
aspect of AWGs and FGs is one of the key features that provides
versatility in a source. Another key feature of AWGs is linking and
looping capabilities (staging of waveforms). You can link and loop
(repeat) multiple waveforms stored in onboard memories to generate
a more complex waveform, see Figure 10.
Measurements
Counter Value
250
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
Measurement Hardware
Tutorial
mMITE
CPU
retrieves
from RAM
Storage
Control
Sequential Operation
Driver Software
Measurement hardware without software is of little use and
measurement hardware with poor software can be worse. The
majority of PC-based measurement applications use driver software.
National Instruments driver software is the software library that directly
programs the registers of the measurement hardware, managing its
operation and its integration with the computer resources, such as
processor interrupts, DMA, and memory. Driver software hides the
low-level, complicated details of hardware programming while
preserving high performance, and providing you with an easy-tounderstand interface.
The growing sophistication of measurement systems, applications,
and operating systems increases the importance and value of good
driver software. Properly developed driver software delivers both
flexibility and performance, while also significantly reducing the time
required to develop your measurement system. Be sure to scrutinize
the driver software as carefully as the measurement hardware before
selecting products. See page 252 to learn more about measurement
driver software.
Tutorial
be tied up with the task of transferring data into RAM. The PCI bus and
other variants such as PXI/CompactPCI, and IEEE 1394 extend data
throughput rates as high as 132 MBytes/s, and also have provisions
for processor-free direct memory access called bus mastering. For
example, during bus mastering, the PCI digitizer takes control of the
PCI bus, transfers data at high rates of speed, then releases the bus for
other use.
Figure 12 depicts data being transferred into RAM by a PCI bus
master. While the data is coming in, the processor reads the data out
and performs system level tasks with it. Note that not all PCI digitizers
have bus mastering circuitry. PCI without bus mastering relies on
interrupts for transfers and therefore requires processor involvement in
the transfers, which degrades system performance. In fact, systems
using ISA boards with DMA outperform systems using PCI slave
boards. Many digitizers that have bus mastering circuitry use off-theshelf bus mastering chips that are not optimized for measurement
devices. For example, you might be able to transfer a quick burst of
data to RAM but could not do this continuously. For this reason,
National Instruments developed the MITE ASIC. Using up to three
separate DMA controllers, the MITE seamlessly distributes data at rates
in excess of 100 Mbytes/s even over noncontiguous memory areas
typical of virtual-memory-based operating systems, such as Windows
2000/NT/Me/9x, using a technique called on-the-fly scatter-gather.
Application Software
A common, efficient way to program measurement hardware is to use
application software. You can use National Instruments measurement
driver software with any compatible third-party application software,
and with National Instruments application software products, such as
the industry-leading LabVIEW graphical programming software and
Measurement Studio. Application software adds analysis and
presentation capabilities to the driver software. The application
software also integrates instrument control (GPIB, RS-232, PXI, and
VXI) with computer-based measurement components.
See the Instrumentation Software Overview on page 52 for more
information on National Instruments application software for
graphical, C/C++, Visual Basic, and ActiveX program development.
Calibration
Direct
transfer
to RAM
mMITE
Storage
Control
Parallel Operations
National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com
Measurements
Display
CPU
retrieves
from RAM
251