Find Out the Trigger Timestamp and Waveform Timestamp Using NI-SCOPE

Updated Jun 20, 2023

Environment

Hardware

  • PXI Oscilloscope

Software

  • LabVIEW

Driver

  • NI-SCOPE

Trigger timestamping and Waveform timestamping can be needed when you perform a measurement or synchronize a measurement. In this article, we will look at a NI-SCOPE-based implementation of Timestamp.
 

For realization, we need to have on the block diagram these APIs:  "niScope Fetch Cluster" (with sub-point "Complex WDT (Waveform Data Type)" or "WDT (Waveform Data Type)") or "niScope Read" (with sub-point "WDT") and these functions "Unbundle By Name Function" and "Get Waveform Components (Analog Waveform) Function".
 
1. Adding SCOPE API: Measurement - NI SCOPE - Acquisition - Fetch.vi or Read.vi
Complex WDT (Waveform Data Type)                      WDT (Waveform Data Type)             niScope Read (WDT)       

2. Add Unbundle By Name Function and connect to the Fetch or Read by using "wfm info" out. Then select from the Bundle "relativeInitialX" *.

                                                                                       Screenshot 2021-07-04 235730.png
3. Add Get Waveform Components (Analog Waveform) function and connect to the Fetch or Read by using "wfm" out. Then select from this "to" **.

                                                                                         Screenshot 2021-07-05 000236.png                     
4. t0 will show waveform timestamp:

                                                                       Screenshot 2021-07-05 110731.png
5. For trigger timestamp need to subtract "relativeInitialX" from "to":

                                                                      Screenshot 2021-07-05 111214.png

*   relativeInitialX is the time in seconds from the trigger to the first sample in the acquired waveform. 
** t0 returns the trigger time of the waveform.

rtaImage.jfif