This example uses NI-SCOPE to measure the time between two trigger events on two different digitizers.
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:
Each digitizer is programmed to wait on a separate analog edge trigger.
Both digitizers are synchronized using NI-TClk.
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.
The entire record is then fetched, and the actual time of each trigger is found by subtracting the relativeInitialX value from the absoluteInitialX value.
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
Application Software: LabVIEW Base Development System 8.2
On the Front Panel, choose which digitizers you want to use.
Configure all other parameters on the top row, including the trigger parameters.
Hook up the active channel of each digitizer to a function generator that is producing pulses.
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 theFundamentalssection of theNI High-Speed Digitizers Help Manual.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.