Global TMW:
Login  |  Register          Free Newsletter Subscription
Subscribe
Email
Print
Reprint
Learn RSS

Line Up Those Measurements with Synchronized Clocks

You have several options for synchronizing measurements across PCI, ISA, and PXI/VXI cards.

Martin Rowe, Senior Technical Editor -- Test & Measurement World, 11/1/2000

When you need to synchronize the acquisition of several signals, you’ll have to rely on one of several techniques to ensure you acquire data at just the right time. These synchronization techniques range from general software loops that loosely synchronize your measurements to specialized trigger buses that synchronize measurements to within nanoseconds.

Measurements on two or more channels need not occur within a picosecond of each other for you to consider them synchronized. I prefer to think of synchronized measurements as measurements on two or more signals, where the samples occur close enough in time that you don’t miss anything significant. Just like “real time” means “fast enough,” I think of “synchronized” as “close enough in time” relative to a sample clock.

In some applications, you can use software to generate clocks and triggers. Suppose you’re measuring the temperature at two points inside an enclosure. Temperature changes slowly, so you might sample at 10 samples/s. Even if you have a separate 10-Hz ADC clock for each channel, measurements will occur within 50 ms of each other. That’s probably good enough, so you might be able to rely on a software loop to time the measurements in this application. According to Alex Ivchenko, R&D engineering manager at United Electronic Industries (Watertown, MA), Windows can skew your measurements by tens of milliseconds.

In most applications, though, you’ll need to use hardware to synchronize your measurements. Suppose you’re performing a shock or vibration test on the enclosure. A 10-Hz sample rate is far too slow. You might have to measure shock at several points on the enclosure at the moment of impact. Now, you need to sample accelerometer outputs at perhaps 200 ksamples/s. Forget about using software loops to time your measurements. For precise, repeatable sampling times, you must use hardware to generate clock and trigger signals.

Although software loops provide a degree of timing control, for accuracy below about 50 ms, you’ll have to rely on hardware to synchronize your measurements. Unfortunately, most general-purpose buses such as PCI, CompactPCI, ISA, and VME lack signals designed to synchronize operations.

Many data-acquisition cards for the PCI bus and the ISA bus circumvent this problem by providing external buses that let you synchronize clocks and triggers across multiple cards. The PXI (PCI eXtensions for Instrumentation) bus and VXI (VME eXtensions for Instrumentation) cards have an instrumentation bus that supplies dedicated clock and trigger lines that can control instrument cards. You can use these clock and trigger lines to synchronize not only measurements but also analog and digital stimulus signals.

External Clocks

In addition to onboard ADC clocks, most data-acquisition cards have external clock and trigger inputs on their main I/O connectors. You can connect an external clock source to the clock inputs of two or more cards, which gets them to synchronously digitize their input signals. You can also connect a common trigger signal to the cards’ external trigger inputs. When the cards receive the trigger signal, they simultaneously digitize their analog inputs.

TMW00_11F1FIG1.gif (15774 bytes)
Figure 1. A D flip-flop triggers two cards running at different clock rates. (Courtesy of Gage-Applied.)
Some applications require the synchronization of two clocks. A test of the response of a fiber-optic photodiode is one such application. As illustrated in Figure 1, one board samples the photodiode’s output at 15 MHz while another takes temperature samples at 100 kHz.

The application starts with a 15-MHz external clock and uses a divider circuit to produce the 100-kHz clock. A manual pushbutton acts as the trigger for both cards. The acquisition starts on the first rising edge of the 100-kHz clock after the pushbutton is pressed. In this case, the skew produced by the propagation delay in the divider is insignificant.

You may not need an external clock or trigger source to synchronize measurements across two or more cards. You can sometimes use one card’s ADC clock as a master clock for other cards. Many ISA and PCI cards have an external bus that sends ADC clock and trigger signals from a master card to slave cards.1 Figure 2 shows two PCI boards connected through a ribbon cable. (Some cards use rigid boards instead of flexible cables.) The cable carries ADC clock and trigger signals from a master card to a slave card.

After you install your ISA or PCI cards and connect their external buses together, you must use the manufacturer’s software to configure the cards as a master and slave(s). To program your cards, send commands to their driver. The programming commands tell the master to make its clock and trigger signals available to the external bus. You also command the slave board to initiate an acquisition based on the bus trigger input and clock from the master.

TMW00_11F1fig2.gif (24644 bytes)
Figure 2. Many data-acquisition cards use a local bus to transfer clocks and triggers between cards. (Courtesy of National Instruments.)
Many data-acquisition cards contain analog and digital output subsystems, too. You may, for example, need to synchronize the analog output of a master card to the analog inputs of the master card and to slave cards. You can use the same techniques for synchronizing ADC subsystems; you set up one card as a master and others as slaves.

For some applications, a data-acquisition card with a multiplexer won’t suffice. Instead, you’ll need a card with sample-and-hold (S/H) circuits or dedicated-channel ADCs. (See “Scan, Hold, or Dedicate an ADC?” below). In automotive crash testing, for example, you need to make synchronized measurements, often from several accelerometers. A multiplexed card won’t work; you need either an S/H card or one with dedicated ADCs.

Using a master/slave arrangement gets the samples synchronized—almost. There’s a propagation delay between the time the master card samples and the time the master’s sample clock reaches the slave card or cards. The slaves will be in sync with each other, but they will sample slightly later than the master. To compensate, a master card might store the measurements of the master in memory for one or two ADC clock cycles. Some manufacturers fix the delay time based on their card’s performance. Others let you program this delay through a card’s driver.

Instrumentation Buses

External buses, S/H circuits, and dedicated ADCs can synchronize measurements on ISA and PCI cards. PXI cards and VXI cards, though, extend their PCI and VME buses, respectively, by adding trigger and clock lines to their bus backplane. These additional lines were originally added to the VME bus, which became the VXI bus. The same signals extended the PCI bus (in the CompactPCI form factor) to form the PXI bus. Figure 3 shows a “star trigger” line and an eight-line trigger bus.

TMW00_11F1FIG3.gif (20872 bytes)
Figure 3. The PXI and VXI bus add a trigger bus and a star trigger to the CompactPCI bus and the VME bus for synchronizing measurements across cards. (Courtesy of National
Instruments.)

You can set up your PXI and VXI cards to make any of the eight lines on the trigger bus as a trigger output, trigger input, clock output, or clock input. The PXI and VXI buses also include a 10-MHz reference clock that you can a divide or multiply and use it to clock an ADC.

The star trigger connects from a trigger master card (which you must place in slot 2 in a PXI system) to all other I/O slots (3 to 8). All slots have equal-length PCB traces from slot 2, so the star-trigger signal arrives at all slots at the same time. That’s important for high-speed digitizing. Electrons travel at 1 ft/ns. With a card sampling at 2 GHz, a foot of wire or PCB trace will cause a skew of 2 samples.

How can you use the instrumentation “extensions” in PXI and VXI cards to synchronize measurements? In one example, an ultrasonic materials test uses PXI digitizers. An ultrasonic (100 kHz–200 kHz) pulse hits the DUT, and digitizers measure the sound through five ultrasonic microphones mounted on the DUT. The captured signals indicate how the DUT distorts the signal. This application uses three two-channel PXI digitizers sampling at 100 Msamples/s. The card in slot 2 generates the 100-MHz master clock from the 10-MHz reference clock and places it on the star-trigger bus. The master digitizer card detects the pulse and sends a signal over the trigger bus to the slave cards. The trigger pulse tells the slave cards to sample at 100 Msamples/s starting on the next 10-MHz clock signal.

The applications I’ve described give you an idea of how to synchronize ADCs. When you synchronize measurements, don’t accidentally defeat the synchronizing by running different wire lengths between your data-acquisition system and signal sources. Remember the 1 ft/ns rule for traveling electrons. So at high digitizing rates such as 100 Msamples/s, differing wire lengths can add skew to your measurements. Keep all signal wires the same length so you’ll get equal delays. T&MW

FOOTNOTE

1. Manufacturers of data-acquisition cards use proprietary external buses with different names. Data Translation (Marlboro, MA) uses the name DT-Connect while National Instruments (Austin, TX) calls its bus Real-Time System Integration (RTSI). See www.ni.com/support/daq/program/rtsi for information about RTSI.

You can contact Martin Rowe at mrowe@cahners.com

Scan, Hold, or Dedicate an ADC?

From a measurement-timing perspective, data-acquisition cards come in two flavors. The most common type uses a single ADC with a multiplexer (mux) front end that increases the number of channels from one to eight (differential) or 16 (single-ended). With these cards, you’ll have a delay between acquisitions as the card executes a scan list that you download into the card.

Check your card’s specifications for scanning throughput, which is typically slower than single-channel throughput. Throughput also varies with gain because of multiplexer settling time. If the time required for a card to scan its channels is fast enough for your application, then you can consider all of the measurements synchronized.

If you use two or more PCI or ISA cards, each with a single ADC and mux, you can synchronize the cards’ scan lists. To do that, you load scan lists into the boards and connect a common clock and trigger to the cards. That ensures all cards start scanning at the same time.

If the time delay between channels is enough to cause unacceptable timing skews in your measurements, you can use a simultaneous sample-and-hold (S/H) card or a card with a dedicated ADC per channel. An S/H card samples all the channels at once and holds the sampled voltages until a single ADC can digitize your data. These cards typically come with four channels. With an S/H card, you may get all the channels sampling at the same time, but you have a mux delay in getting those measurements into the card’s memory. Cards with dedicated ADCs can simultaneously sample and store data on all channels. In either case, be sure to check the cards’
specifications for throughput.—Martin Rowe

FOR FURTHER READING
Application Note AN-284, Implement Infinite Sample-and-Hold Circuits Using Analog Input/Output Ports, Analog Devices, Norwood, MA. www.analog.com/techsupt/application_notes/AN284.pdf.
Application Note AN-266, Circuit Applications of Sample-Hold Amplifiers, National Semiconductor, Santa Clara, CA. www1.national.com/an/AN/AN-266.pdf.

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

Sponsored Links



 
Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Podcasts

Blogs

  • Martin Rowe
    Rowe's and Columns

    November 5, 2008
    Technical articles retain value
    I'm always amazed, and pleased, when I hear from readers who still find value in old T&MW articl...
    More
  • Martin Rowe
    Rowe's and Columns

    October 31, 2008
    Measurement proverbs
    The other day, I received some measurement proverbs that I'd like to share. The proverbs come from K...
    More
  • » VIEW ALL BLOGS RSS

Podcasts

Advertisements





NEWSLETTERS
Click on a title below to learn more.

Test Industry News (3 Times Per Month)
Machine-Vision & Inspection (Monthly)
Communications Test (Monthly)
Design, Test & Yield (Monthly)
Automotive, Aerospace & Defense (Monthly)
Instrumentation (Monthly)
Resource Center E-Alert (Monthly)
©2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites