LabVIEW Real-Time Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CyberSmith

Allow setting RT target system time using NTP time server with high accuracy

Status: New

Many networks have NTP (network time protocol) time servers locked to a GPS signal with claimed accuracy of better than 1 millisecond. NTP seems to be the de facto standard for distributing accurate time to systems accross a network. I would like to see a VI that can use this widely available protocol to set the system time with as much accuracy as possible.  The RT Set Date and Time VI only permits specifying the time down to 1 second.

 

A forum contributor has provided a VI to read the NTP protocol, but uses the RT Set Date and Time VI to set the RT target system time losing any resolution beyond the second.  This VI eliminates the greater precision available using the NTP protocol.  The contributed VI also does not implement any of the advanced algorithms to improve the accuracy of using NTP over a network which are described at NTP.org and at links that may be found there. 

 

Very tight synchronization (millisecond or better) of many RT targets is possible when the NTP protocols are fully implemented.  I need accurate millisecond resolution on many RT targets over a wide (several thousand square miles) area.  These RT targets recieve their data streams via radio telemetry so signal propagation time over the area is essentially zero.  Processing of the data relies on the relative accuracy of time-tags generated at multiple sites.

 

 

5 Comments
Dan_Mondrik
Active Participant

The new API that we have for configuring RT targets is NI System Configuration, and we actually have a way to set the time with sufficient precision to meet your needs. See this example VI I have attached.ChangeTime.vi.png

Jeremy_L
NI Employee (retired)

One thing you can try is NI-TimeSync.  There is a version that supports SNTP on RT targets currently posted on NI Labs:

https://decibel.ni.com/content/projects/timesync-sntp-support

 

Using NI-TimeSync, you can synchronize the RT system time to an SNTP server through some fairly simple configuration settings, and I think it should hit the accuracy targets you want.  I would suggest trying this out and see if it fits your needs.

Jeremy L.
National Instruments
BlueCheese
NI Employee (retired)

Also, I'll point out that IEEE-1588 is rapidly replacing NTP for continuous synchronization of various systems over a network where sub-ms accuracy is desired. NTP is really only designed for synchronization above those levels as it cannot account for jitter in network cards, switches, routers, etc. Most dedicated "time servers" which can get time from GPS and serve it to a network can serve up 1588 these days as well. NI offers 1588 solutions ranging from the software-only 1588 support in NI-TimeSync up to our PXI-668 and PCI-1588 which can get synchronization down to the order of tens of nanoseconds.

 

Eric

xl600
Active Participant

I've just installed the TimeSync-SNTP and it seems to work pretty well even with LVRT 2014.  Why hasn't this been incorporated into the production TimeSync software?  Having to back up to an older prototype version and suffer the loss of updates is highly irritating and potentially risky.  NTP should be a standard option for those who don't need the accuracy of or those who can't suffer the expense of 1588, PPS, GPS, or IRIG.

 

SNTP isn't going to be as capable as full NTP but it's something at least.  In my opinion, full NTP client support should be standard in every operating system for sync accuracy in the ms range.  Someone at NI labs knows how to build it into TimeSync so come on, just mainline it and bring PharLap into line with NTP for good.

NickRanson
Member

Hi All, please could you advise if it is still possible to use NTP to synchronise PharLap with NI Sync / NI TimeSync? All of the links that I can find to NI's pages referenced on the forums seem to be dead now unfortunately.