LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time synchronization between DAQ and GPS

Solved!
Go to solution

I acquire data from a sensor and converted it into digital using NI-9229. I'm using an external GPS from Ublox company as an accurate time source.  However, the time stamp is previously written before the data arrived. Please, I want to stamp the GPS time when the first sample is acquired from the DAQ. 

 

Kindly, find the attached VI for more information.

 

Best Regards 

 

0 Kudos
Message 1 of 15
(1,751 Views)

I believe the LabVIEW DAQ assistant gets its timestamp from the PC clock.

 

Why not use the GPS to set the PC clock?

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 15
(1,705 Views)

Great Thanks for your cooperation. What a wonderful idea..Kindly, could you know method to apply this brilliant idea. 

0 Kudos
Message 3 of 15
(1,698 Views)
Solution
Accepted by topic author Omda2022

take a look at this: Programmatically Set the System Time in LabVIEW  and Set System Time using LabVIEW

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 15
(1,691 Views)

Does the sensor use this same time source?  What's wrong with using the PC as the de facto time source, anyway?  Unless it is important to have the timestamp be accurate relative to the rest of the world, there's nothing wrong with having the PC be the authority.  IMO, at least.

 

Edit: If you manually syncyour Windows PC time to whatever time server it is sync'd to just prior to doing your test, it should get you "close enough".

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 15
(1,674 Views)

Just note that t0 in DAQmx is software based, NI Scope has hardware time stamps. What I am saying is t0 will never be accurate with DAQmx. Use your GPS to trigger the DAQ at a known time, then change t0 later.

0 Kudos
Message 6 of 15
(1,661 Views)

Unfortunately, I have tried the suggested VI's, but the system time (Windows 10) wasn't changed.

0 Kudos
Message 7 of 15
(1,580 Views)

Yes, the sensor data use the same time source. The time stamp should be accurate relative to the rest of the world because, it's data of an active earthquake.

 

I already try to synchronize system time manually.

0 Kudos
Message 8 of 15
(1,570 Views)
Solution
Accepted by topic author Omda2022

To change system time in windows you need to run the vi as an admin, otherwise will not work.

0 Kudos
Message 9 of 15
(1,566 Views)

You have saved the day!!

Thank you very much, and the method for doing that is simply from the following link:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHlRCAW&l=en-EG

0 Kudos
Message 10 of 15
(1,553 Views)