LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time synchronization between GPS and DAQ

Firstly, I have the DAQ that convert the analog data to digital using NI-9229.

Secondly, the output data is written into text file. I have an external GPS, for accurate timing. I want to make the timing of the saved data to be driven from GPS. So, I connected the date/time info to be  written in the text file as a comment (as explained in the attached files).

However, I found that the GPS has a delay about 0.5 second than the DAQ internal clock. In other way, the GPS write the timing info before the DAQ by 0.5 second.

Please, how to solve this problem to ensure that the GPS stamp the time as long as the data acquired from the DAQ.

Download All
0 Kudos
Message 1 of 3
(1,227 Views)

First, I don't see how you are synchronizing the two clocks but that is a side issue. Since you didn't mention the GPS receiver device, we can't even look for it's timing information.

 

Synchronization of two clocks is non-trivial! In fact it consists of extensive ground resources to maintain the GPS constellations clocks on a daily basis.  It would be prohibitive to additionally synch the cDAQ device without a robust external time server (think Rb clock, 100Mhz ref and time of second pulse with calibrated propagation delay in a environmentally controlled space)

 

Beyond that. Your DAQ device has a Sigma delta ADC with an analog pre-filter.  So, T0 will be delayed from start trigger by 40×(5/512)/fs+3.3uSec per the specs. Or, no, you can't get the first reading before the filter settles and the ADC gets enough convert clocks.

 

Sure, you could get the clocks closer but, you are much better off just replacing DAQ T0 with the GPS time as 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(1,208 Views)

You can do the following if your system supports it.

if you have a spare channel use it to record the PPS from the GPS receiver. By using that you can see when a second starts. The time stamping in DAQmx is all software not hardware time stamped, so you will never have an accurate t0 in your file.

0 Kudos
Message 3 of 3
(1,188 Views)