Example Code

NI-SCOPE Pulse Measurement with Sub-nanosecond Resolution

Code and Documents

Attachment

Overview

This example uses NI-SCOPE to measure the time between two trigger events on two different digitizers. 

 

Description

These trigger events are time stamped with sub-nanosecond resolution using the time-to-digital converter (TDC) capabilities of the digitizer. Some useful applications include Time of Flight (ToF) measurements, as well as time measurements between digital signals used in semiconductor tests.

 

This program performs the following steps to measure the time between the separate trigger events on two digitizers with sub-nanosecond resolution:

  1. Each digitizer is programmed to wait on a separate analog edge trigger.
  2. Both digitizers are synchronized using NI-TClk.
  3. Once the acquisition occurs, a single sample is fetched relative to the start of the acquisition in order to find the time difference between the two digitizers relative to each other.
  4. The entire record is then fetched, and the actual time of each trigger is found by subtracting the relativeInitialX value from the absoluteInitialX value.
  5. The total time difference between the two triggers is found by subtracting the trigger times (found from step 4 above) from each other, and then subtracting the time difference between the two digitizers (found from step 3 above).

 

Hardware and Software Requirements

Software

Application Software: LabVIEW Base Development System 8.2

Driver: NI-Scope

Language(s): LabVIEW

Hardware

Hardware Group: High-Speed Digitizers (Scopes)

Hardware Model: PCI-5105, PXI-5154, PCI-5122, PCI-5124, PCI-5142, PCI-5152, PCI-5153, PCI-5154, PXI-5105, PXI-5114, PXI-5122, PXI-5124, PXI-5142, PXI-5152, PXI-5153, PCI-5114

 

Steps to Implement or Execute Code

  1. On the Front Panel, choose which digitizers you want to use.
  2. Configure all other parameters on the top row, including the trigger parameters.
  3. Hook up the active channel of each digitizer to a function generator that is producing pulses.
  4. Run the VI. The results will be displayed in the bottom right.

 

 

Additional Information or References

To determine the time resolution for triggers on your digitizer, please refer to the specifications manual of the device. Further information on topics such as Time Stamping and TDC can also be found in the Fundamentals section of the NI High-Speed Digitizers Help Manual.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.