You are on page 1of 8

Tutorial

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

the thermocouple leads to the dissimilar metals of the measurement


device. By sensing the reference temperature of the connection
points, compensation hardware or software subtracts out this error
voltage from the measured thermocouple voltage. Many signal
conditioning accessories include a temperature sensor for this purpose.
Among other transducers, accelerometers measure acceleration
based on the principle that a piezoelectric element creates a charge as
force is applied to it. By placing a mass on top of this element, you
apply force to the element as the accelerometer moves. By measuring
this charge, you can determine the corresponding acceleration. Two
types of accelerometers are available passive and active. Passive
accelerometers export the actual charge from the piezoelectric
element inside them. They require external signal conditioning
through charge amplifiers. Active accelerometers include internal
circuitry that converts acceleration into a voltage signal. An ICP
accelerometer (integrated circuit piezoelectric) is a common type of
active accelerometer. ICP accelerometers require external power in the
form of a constant current source.

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

Signal Conditioning Needs

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

Figure 1. Typical DAQ System


RTD

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

Table 1. Common Transducers, Their Electrical Characteristics,


and Basic Signal Conditioning Requirements

Measurement Hardware Digitizers


To understand how analog-to-digital conversion works, it is important
to understand the Nyquist theorem and how it affects sampling rate
and analog bandwidth. It is also important to understand the terms
including input range, code width or vertical sensitivity, analog-todigital converter (ADC) resolution, and triggering options.

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

Nyquist frequency. Frequencies above the Nyquist frequency will alias to


appear between DC and the Nyquist frequency.

Channel 2

Adequately Sampled

Interval Scanning
Channel 1

Aliased Due to Undersampling

Channel 2

Figure 2. Effects of Too Low a Sampling Rate


Sampling Rate
Sample rate is the rate at which a signal is acquired and digitized by an
ADC. In the audio domain, signals converted to electrical signals by a
microphone commonly have frequency components up to 20 kHz.
According to the Nyquest theorem, you need a digitizer with a sampling
rate greater than 40 kS/s to properly acquire this signal. Figure 2
demonstrates the problem associated with a sampling rate that is too low.
Analog Bandwidth
Analog bandwidth describes the frequency range (in hertz) in which a
signal can be accurately digitized. This limitation is determined by the
frequency response of the input path. Input signals with frequencies
above this bandwidth would result in loss of amplitude and phase
information. Analog bandwidth is defined by the frequencies at which
the measured amplitude is 3 dB below the actual amplitude of the signal.
This amplitude loss occurs at low frequencies if the signal is AC coupled
and at high frequencies regardless of coupling. When the signal is DC
coupled, the bandwidth of the amplifier extends all the way to the DC
voltage. The result is a loss of high-frequency components and amplitude
in the original signal as the signal passes through the instrument.
Figure 3 demonstrates this problem.

+2 V

0V

Bandwidth

+1/2 V
0V
1/2 V

1 V
2 V
Input Signal

Instrument

Measured Signal

Figure 3. Effects of Insufficient Bandwidth


Sampling Methods
Simultaneous Sampling For applications where the time relationship
between inputs is important (such as phase analysis of AC signals), you

Channel 1
Channel 2

Figure 4. Sampling Methods Simultaneous Sampling,


Interval Scanning, Continuous Scanning
need to sample simultaneously. Measurement products capable of
simultaneous sampling use sample-and-hold circuitry for each input
channel or an individual ADC for each analog input.
Interval Scanning You can simulate simultaneous sampling hardware
without needing an ADC per channel or sample-and-hold circuitry.
Interval scanning creates the effect of simultaneous sampling for lowfrequency signals, such as temperature and pressure, while
maintaining the cost benefits of continuous scanning. This method
scans the input channels at one interval and uses a second interval to
determine the time before repeating the scan. The input channels are
each scanned within microseconds, creating the effect of
simultaneously sampling the input channels.
Continuous Scanning When acquiring data from several input
channels, an analog multiplexer connects each signal to the ADC at a
constant rate. This method, known as continuous scanning, is
significantly less expensive than having a separate amplifier and ADC
successively for each input channel.
Because the multiplexer switches between channels (see information
below on multiplexing/switching), a time skew is generated between
each channel sample. This method is appropriate for applications where
you do not need to capture the time relationship between sampled
channels with great accuracy.

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

You can use external analog multiplexers to increase the number of


channels a device can measure. For example, SCXI uses multiplexing
modules to expand the number of input channels up to 3,072 with a
single multifunction DAQ device. See page 426 for more information
on switching technologies and devices.

Frame 3

Trigger Level

Input Signal

Sample Times

Basic ADC Considerations


t1

t2

t3

t1

t2
t3

Figure 5. Random Interleaved Sampling Method


Random Interleaved Sampling (RIS) Typically found in high-speed
digitizers, RIS is a method used to sample signals so that the apparent
sampling rate is higher than the real sampling rate. For example, the
NI 5112 has a real-time sampling rate of 100 MS/s, but using RIS, the
device can sample repetitive signals at 2.5 GS/s. You can employ this
technique only when measuring repetitive signals. RIS is accomplished
by sampling different points along the waveform for each occurrence
of the trigger. The arrival of the waveform trigger point occurs at some
time randomly distributed between two sampling instants. The time
from the trigger to the next sampling instant is measured, and with
this measurement the waveform can be reconstructed from samples
acquired over several cycles.
Multiplexing/Switching
A common technique for measuring several signals with a single ADC
is multiplexing, also known as switching. A multiplexer selects and
routes one channel to the ADC for digitizing, then switches to another
channel, and then repeats. Because the same ADC is sampling many
channels, the effective rate of each individual channel is reduced in
proportion to the number of channels sampled.

Measurements

Amplitude
10.00
8.75
7.50
6.25

111
110
101

Code Width/Vertical Sensitivity


The ideal analog code width, or vertical sensitivity, defines the analog
unit called the least significant bit (LSB). The range, resolution, and
gain available on a digitizer determine the smallest detectable change
in voltage. This change in voltage represents 1 LSB of the digital value
and is often called the code width. You can find the ideal code width
by dividing the voltage range by the gain times two raised to the order
of bits of resolution. For example, one of our 16-bit multifunction DAQ
boards, the NI 6030E, has a selectable range of 0 to 10 or -10 to 10 V
and selectable gain of 1, 2, 5, 10, 20, 50, or 100. With a voltage range
of 0 to 10 V, and a gain of 100, the ideal code width is:

16

011

Therefore, the theoretical code width of one bit in the digitized value
is 1.5 V.

010
001

Critical Digitizer Considerations

000

0
0

20

40

60

80

100

Figure 6. Digitized Sine Wave with 3-Bit Resolution

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

Although the basic specifications previously described may show that


a digitizer has a 16-bit resolution ADC with a 100 kS/s sampling rate,

Measurement Hardware
Tutorial
APPARENT DIGITIZED STRAIGHT LINE

24576

0.75

16384

0.50

Error Expressed in 16-Bit Digital Code

16-Bit Digital Code

32768

8192
0
-8192
-16384

Tutorial

32768
.
.
.
1.00

MEASURE OF RELATIVE ACCURACY

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

a. Apparent Digitized Straight Line

-1.00
.
.
. -10.0
-32768

-7.5

-5.0

-2.5

0.0

2.5

5.0

7.5

10.0

Input Voltage

b. Measure of Relative Accuracy

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

Differential Nonlinearity (DNL)


Ideally, as you increase the level of voltage applied to a digitizer, the
digital codes from the ADC should also increase linearly. If you plotted the
voltage versus the output code from an ideal ADC, the plot would be a
straight line. DNL is a measure in LSB of the worst-case deviation of code
widths from their ideal value of 1 LSB. A perfect digitizer has a DNL of
zero LSB. Practically, a good digitizer will have a DNL within 0.5 LSB.

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

Probability of Code Occurence

Probability of Code Occurence

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

Noise codes in LSB

Noise codes in LSB

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

Floating Signal Source


(Not Connected to Building
Ground)
Ungrounded Thermocouples
Signal conditioning with isolated
outputs
Battery devices

Grounded Signal Source


Plug-in cards with nonisolated
outputs

Differential (DIFF)
+
-

ACH0(+)
V1

ACH0(-)

+
-

+
-

ACH0(+)
V1

+
-

ACH0(-)

ACH0GND

ACH0GND

See text for information on bias resistors.

Ground Referenced
Single-Ended
(RSE)

+
-

ACH
V1

AIGND

+
-

NOT
+
-

V1

RE C

ACH

OMM

+ Vg

ENDED

Ground-loop losses, Vg, are added to


measured signal

Nonreferenced
Single-Ended
(NRSE)

+
-

ACH
V1

AISENSE

+
-

+
-

ACH
V1

AIGND

See text for information on bias resistors.

Figure 9. Summary of Analog Input Connections

AISENSE

+
-

AIGND

Measurement Hardware
Tutorial

Connecting Signals to Digitizers


Floating Signal Sources
A floating signal source is not connected in any way to the building
ground system, but rather has an isolated ground-reference point.
Some examples of floating signal sources are outputs of transformers,
thermocouples, battery-powered devices, optical isolator outputs, and
isolation amplifiers. An instrument or device that has an isolated
output is a floating signal source. It is important to tie the ground
reference of a floating signal to the analog input ground of the
digitizer to establish a local or onboard reference for the signal.
Otherwise, the measured input signal varies as the source floats out of
the common-mode input range.

Measurement Hardware Sources


Analog output circuitry is often required to provide stimuli for a
measurement system. Several specifications for DACs determine the quality

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

Waveform Linking (Staging List)

Figure 10. Waveform Linking and Looping

Arbitrary Waveform and Frequency Generators

Measurements

Ground-Referenced Signal Sources


A ground-referenced signal source is connected in some way to the
building system ground and is, therefore, already connected to a common
ground point with respect to the digitizer, assuming that the computer is
plugged into the same power system. Nonisolated outputs of instruments
and devices that plug into the building power system fall into this category.
The difference in ground potential between two instruments
connected to the same building power system is typically between
1 and 100 mV but can be much higher if power distribution circuits are not
properly connected. If a grounded signal source is improperly measured,
this difference may appear as an error in the measurement. The
connection instructions for grounded signal sources are designed to
eliminate this ground potential difference from the measured signal.
See Figure 9 for a summary of different options for connecting
signals to digitizers.

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

oscilloscopes/digitizers, record length limits the maximum duration of


a single-shot acquisition. For example, with a 1,000-sample buffer and
a sample rate of 20 MHz, the duration of acquisition is 50 s (the
number of points divided by the sample rate or 1,000/20 MHz = 50
s). With a 100,000-sample buffer and a sample rate of 20 MHz, the
duration of acquisition is 5 ms (100,000/20 MHz). To capture long
waveforms with traditional oscilloscopes, you are forced to lower the
sampling rates, losing valuable information about the acquired signal.
With deep memory (> 4 MB), available on many NI high-speed
digitizers you maintain high sampling rates while acquiring long,
complex signals. For many National Instruments digitizers, data is
streamed directly to the host PC memory, making the record length
equal to the available PC RAM. Furthermore, you can perform
continuous operations and acquire more data than can fit in the
available PC RAM using double-buffered operations. This is beneficial
if you want to monitor signals for extended periods of time so you can
log data to disk, display it on screen, or post it to the Web.

Arbitrary waveform generators (AWGs) and frequency/function


generators (FGs) generate a wide variety of standard and user-defined
signals. They are typically characterized by high accuracy, highfrequency resolution, versatility, and stability. AWGs generate diverse
waveforms at high frequencies because of deep onboard memory

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.

Measurement Hardware Digital I/O

Measurements

Digital I/O (DIO) interfaces are often used on computer-based


measurement systems to control processes, acquire and generate
patterns for testing, and communicate with peripheral equipment. In
each case, the important parameters include the number of required
digital lines available, the rate at which you can accept and source
digital data, and the drive capability of the lines. If the digital lines are
used for controlling events such as turning on and off heaters, motors,
or lights, a high data rate is usually not required because the
equipment cannot respond very quickly. The number of digital lines,
of course, needs to match the number of items that are controlled.
In each of these examples, the amount of current required to turn
the devices on and off must be less than the available drive current
from the board. With the proper digital signal conditioning
accessories, however, you can use the low-current TTL signals of the
measurement hardware to monitor and control high voltage and
current signals from industrial hardware.
A common application is to transfer data between a computer and
equipment such as data loggers, data processors, and printers.
Because this equipment usually transfers data in one byte (8-bit)
increments, the digital lines on a plug-in digital I/O board are arranged
in groups of eight. In addition, some boards with digital capabilities
will have handshaking circuitry for communication synchronization
purposes. The number of channels, data rate, and handshaking
capabilities are all important specifications that should be understood
and matched to the application. See page 398 for more information
on digital I/O technologies and devices.

Measurement Hardware Counter/Timers


Counter/timers are useful for many applications, including counting
the occurrences of events, digital pulse timing, and generating square
waves and pulses. You can implement all of these applications using
Input Signal

Counter Value

Measurement Hardware Synchronized


Measurements
Engineers and scientists use National Instruments products in
measurement systems ranging from automotive subsystem test to
electronic component evaluation and automated manufacturing test. A
critical aspect in many of these systems is the synchronization of
measurements. Many of todays measurement systems require
sophisticated timing of I/O functions such as analog input, analog
output, counter I/O, image acquisition, motion control, digital I/O, and
CANbus communications. Precise synchronization of your measurements
requires hardware and software timing and triggering capabilities. The
following solutions are based on synchronized measurements:
Tests for complex mixed-signal circuits, such as systems-on-chip (SoC)
Analog-to-digital converter (ADC), and digital-to-analog converter
(DAC) performance tests
Stimulus/response tests of analog electronic components
14-channel 100 MHz digitizer/oscilloscope
Measurements in rotating systems
Systems for visual inspection of high-speed machining tasks
Vision-based guidance of robotic assembly
Visual scanning and probing of printed circuit boards
Automotive crash-test systems
Tests of CAN-based automotive systems
Computer-based technologies offer you easy ways to synchronize the
operation of two or more instruments. NI also offers system timing
with high-stability timing based on OCXO technology. NI timing and
triggering technologies make synchronized measurements and
control easy, reliable, and accurate. See page 266 for more information
on synchronized measurements.

Bus Mastering and DMA for


High System Performance
0

Figure 11. Counter/timers count events.

250

three counter/timer signals gate, source, and output. The gate is a


digital input that enables or disables the function of the counter. The
source is a digital input that causes the counter to increment each time
it toggles, and therefore provides the timebase for the operation of the
counter. Finally, the output generates digital square waves and pulses
at the output line.
The most significant specifications for operation of a counter/timer
are the counter size and clock frequency. The counter size is the
number of bits the counter uses. A larger size means that the counter
can count higher and longer. The clock frequency determines how
fast you can toggle the digital source input. With higher frequency,
the counter can measure and generate higher frequency signals and
provide higher resolution for measuring time. See page 416 for more
information on counter/timer technologies and devices.

National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com

An important aspect of creating PC-based measurement systems is


high-speed data throughput coupled with simultaneous data
processing. To carry out system level tasks, the processor should not

Measurement Hardware
Tutorial

Data Acquisition without Bus Mastering


Display
CPU
transfers
to RAM

mMITE

CPU
retrieves
from RAM

Storage
Control

Sequential Operation

Data Acquisition with Bus Mastering

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

Figure 12. Slave boards burden the microprocessor with data


transfer between the board and computer RAM. This method
reduces the overall performance of the system. Bus-master
boards are capable of continuously transferring data at rates
above 100 Mbytes/s without burdening the microprocessor.
This results in increased system performance.

National Instruments
Tel: (512) 794-0100 Fax: (512) 683-9300 info@ni.com ni.com

Measurements

Display
CPU
retrieves
from RAM

The ability of a measurement device to accurately measure a physical


quantity changes with a number of factors. Time in service,
temperature, humidity, environmental exposure, and abuse can all
affect your measurement accuracy. Calibration decreases measurement
uncertainty by comparing your measurement device to a traceable
standard. All of National Instruments measurement products are
shipped with a Certificate of Conformance. Whether your calibration
needs are driven by ISO-9000 requirements or by company mandates,
National Instruments can help you comply. See page 256 for more
information on calibration, or visit ni.com/calibration See page 880
for more information on NI services.

251