NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO-9045 / Linux RT / Timekeeping

Hi,

All my Linux know-how since years does not help to understand what is going on. I do not even know if this is a Hardware(cRIO)  or OS (RT) based issue.

First i have to learn, that (S)NTP and the internal NI-Timesync do not play well. Even when i disable ntpd and NI-Timesync the local clock seems to be much too slow compared to Meinberg Stratum1 Server.
This is a loop over ~25 minutes without setting the clock (ntpdate -q)

15:01:25 ntpdate[5733]: adjust time server tardis2 offset -0.418353

15:01:42 ntpdate[5737]: step time server tardis2 offset -2.065047
15:01:58 ntpdate[5741]: step time server tardis2 offset -3.893620
15:02:14 ntpdate[5745]: step time server tardis2 offset -5.176320
15:02:30 ntpdate[5749]: step time server tardis2 offset -6.823049
.
.
.
15:25:57 ntpdate[6127]: step time server tardis2 offset -134.514891
15:26:13 ntpdate[6131]: step time server tardis2 offset -135.798098
15:26:29 ntpdate[6135]: step time server tardis2 offset -137.263150
15:26:45 ntpdate[6139]: step time server tardis2 offset -138.728093

 

For me that means that the system clock is over 9% too slow.
That remembers me in the early start of virtualisation with flaky clocks 🙂

Any ideas?

0 Kudos
Message 1 of 2
(2,162 Views)

Hi bsiege,

 

First i have to learn, that (S)NTP and the internal NI-Timesync do not play well.

Your observation is accurate. Currently, with TSN-enabled targets, the only supported protocols are IEEE 1588 and IEEE 802.1AS. The targets are incapable of running other synchronization protocols because all clocks on the target are now driven by the same internal timekeeper, which is not compatible with usupported synchronization protocols. You can "seed" the system time and have accurate time for a while, but the clocks will drift since the target time is not being maintained. To seed the time, you would need to stop all running time references on the target, set the time using one of the RT VI's, and restart time references so they're initialized with the desired time. This should only be done once (or very infrequently) as restarting the time references often can make them unstable.

Austin
Staff Software Engineer
NI
0 Kudos
Message 2 of 2
(2,145 Views)