Time Stamping

NI High-Speed Digitizers Help (NI-SCOPE)

Edition Date: January 2017

Part Number: 370592AB-01

View Product Info

DOWNLOAD (Windows Only)

NI-SCOPE (English | Japanese)

NI digitizers use a free-running timing clock and/or a time-to-digital converter (TDC) to accurately record the time of an event. The NI 5112 has a 25 MHz clock, whereas the NI 5620/5621 has a 32 MHz clock. They both have 48-bit counters. The NI 5114/5122/5124/5142/5922 have a 64-bit counter. NI-SCOPE creates accurate time records by aligning the NI-TIO clock to the sample clock on your device. This time record is a time stamp. With time stamps, you can correlate multiple records or even multiple acquisitions. You can, for example, determine the amount of time between acquisitions.

Note  Not all digitizers support time stamps. Refer to Features Supported by Device for more information.

How Time Stamps Work

NI-SCOPE returns time stamps with every Fetch function, if the digitizer supports them, in the waveform info structure. This structure contains both absolute initial x and relative initial x parameters. The absolute initial x parameter is the time of the first point in the waveform in units of seconds, and it has a resolution of the maximum real-time sampling period of the digitizer (such as 10 ns for a 100 MS/s digitizer). This time is valid between records and entire acquisitions, provided the clock is not reset. The relative initial x parameter, which is supported by all digitizers, is the time between the first point in your waveform and the trigger. Therefore, the trigger always occurs at time equals zero. It includes the interpolated TDC. This conversion measures when the trigger occurs between two samples. Keep in mind that the relative initial x value is not valid until a trigger occurs when using continuous acquisition. To compute an absolute trigger time that includes the TDC value, use the following formula:

absolute trigger time = absolute initial x – relative initial x

The time it takes for the time stamp counter to roll over depends on the number of bits in the time stamp counter and the clock frequency. Therefore, the rollover would occur for an NI 5112, NI 5620/5621, or NI 5114/5122/5124/5142/5922 if it runs for 130 days, 101 days or 5849 years, respectively. If the rollover occurs, NI-SCOPE returns a warning.

To reset the counter on the NI 5114/5122/5124/5142/5922, call niScope Reset.

To reset the counter on the NI 5112 or the NI 5620/5621, use one of the following methods:

  • Call niScope Reset, niScope Abort, or niScope Close.
  • Call the niScope Initialize function with the reset parameter set to TRUE.
  • Perform an RIS acquisition.

Time Stamps Example

The Timestamps example uses time stamps to compute a histogram of the time between triggers. You can use this example to calculate the minimum time required between records. You can find the Timestamps example by using the shortcut Start»All Programs» National Instruments»NI-SCOPE»Examples.


Not Helpful