How to Get Timestamps with NI-DAQmx in Python?

Updated Aug 28, 2018

Reported In

Driver

  • NI-DAQmx

Programming Language

  • Python

Issue Details

How do I get timestamps with my data using NI-DAQmx in Python?

Solution

There isn't a native way to do this, but you can use other Python libraries such as:
 
If the desired resolution timestamp can't be achieved, use the following formula to determine the elapsed time and incorporate that into your time measurements:
 
Elapsed Time = # of Samples / Sampling Rate

WAS THIS ARTICLE HELPFUL?

Not Helpful