Showing results for 
Search instead for 
Did you mean: 

DAQmx Read Timestamp from 6683H

Go to solution

I have a PXI system with a PXIe-6683H timing reference and various DAQ cards that I would acquire data from using a `DAQmx Read` function. Is there any way for me to configure DAQmx to use the 6683H to derive the timestamps it applies to waveforms, versus getting them from system time? Is this even the right question to ask? I think it is, but it may just be due to my lack of understanding.


The OS on my controller is Windows 10, and I don't want to use the time it supplies because it can at best only be synchronized via NTP (with network indeterminism, this is not good enough for my application).

0 Kudos
Message 1 of 7

Hey KingWeasel11,


I do not know about applying a specific timestamp from your sync device but there are several options to ensure that your DAQ devices are synchronized to your 6683. I have attached several articles below that discuss how to perform this synchronization.


Synchronization Explained



Using PXI Timing and Triggering Functionality



What is the Star Trigger on the PXI Backplane?



Hope these help.

Gerald M.
Applications Engineer
0 Kudos
Message 2 of 7

Hi Gerald,

I finished going down that path last week, and now have all of my chassis clocks disciplined by the GPS time reference down to the precision that the hardware allows (I actually intend to write a blog post about syncing a bunch of PXIe-4303 channels in multiple chassis, similar to what this blog post did for modular instruments, and what this paper did for PXI-4472's in multiple PXI chassis).


The problem I am trying to solve now is merging the data collected by the chassis with external GPS tracking data. To do this, I need the time of day that the samples were collected as accurately as possible. I am going to attempt to use the `Get Time` VI to get a timestamp right before doing a `DAQmx Read` and postfix the timestamp to the collected data, but I'm not sure how accurately that represents when the samples were actually taken. I thought that maybe there was a way to tell DAQmx to use the very accurate timing source that exists in the chassis instead of the system time on my Windows machine. Not true?



0 Kudos
Message 3 of 7

Hi Gerald,


I actually finished going down that path last week. I have all channels in my multiple chassis setup synchronized to and disciplined by the 6683H as far as signal timing goes (in fact, I intend to write a blog post about syncing multiple PXIe-4303 channels in multiple chassis, similar to what this one did for synchronizing modular instruments, and what this white paper did for synchronizing PXI-4472's).


The problem I'm trying to solve now is this: once I've collected all of this high-resolution data from my PXIe multiple chassis system that has all of its samples synchronized to within nanoseconds or less, I need to merge this data with GPS tracking data from a different system. A `DAQmx Read` takes all of this quality collected data and slaps a Windows timestamp on it (yikes). I thought that perhaps DAQmx could be told that there is a better clock in the system (the 6683H), and that DAQmx could get its timestamps from there instead. Not true?

0 Kudos
Message 4 of 7

As a followup, does Pharlap have an IEEE 1588 daemon built into it? If so, a reasonable solution may then be to use the 6683H as a PTP grandmaster that syncs the system clock of my controller running Pharlap (or a Linux built with a real time kernel).


My current plan is to use an NI Sync `Get Time` call before doing a read, then applying this timestamp postfix, but I'm not sure how accurately that represents when the actual samples were taken. 

0 Kudos
Message 5 of 7
Accepted by KingWeasel11

Hey KingWeasel11,


You might find this helpful.


Configuring a 1588 Time Reference on Controllers Running Phar Lap and VxWorks Real-Time Operating System


Gerald M.
Applications Engineer
0 Kudos
Message 6 of 7

Sweet, thank you. So to summarize:


  • DAQmx can only get timestamps for its `Read` operation from the operating system clock
  • Using an OS that supports a IEEE 1588 (PTP) client daemon, one can sync the OS clock to sub-microsecond precision (this depends on the complexity of the network PTP is running on) and make the timestamp from DAQmx reads correspond to the time of day more precisely


One strategy that I've been able to apply is to use the NI Sync `Get Time` function and read the latest timestamp directly from the 6683H right before a DAQmx read and apply that timestamp to the collected data. I still need to test the validity of that solution against a PPS source, but it looks promising. 

0 Kudos
Message 7 of 7