LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the SNTP period programmatically

Hi everyone-

 

     I can confirm there is NOT a bug in the SNTP software for cRIO controllers.  The SNTP syncronization algorithm makes a large jump/change/sync as soon as the controller powers on. After that it would be incredibly dangerous for code running on a deterministic system if the time changed at all and skipped over seconds, etc.  So after the initial sync you should be within milliseconds of the server and the cRIO will determine if it's keeping up or not. Then (very) slightly adjust the frequency of the RT clock.  This change will bring you back into synchronization without changing the time at all (by running quicker or slower, very slightly).

 

    I've talked to many customers that try to test the algorithm by going in and setting the time to be something different and waiting for it to correct.  By doing this, the syncronization with the server is broken.  The cRIO has limits to what it can adjust the frequency to, and if it has to adjust them too much, an error will be thrown and nothing will happen anymore. A large change is only made once, at startup.

 

    The best way to know if you're getting updates is to use the log file and the comparative equations in the following KB.  Additionally, if you do get too far out of sync (which is VERY unlikely unless you change the time on your own) the error will be thrown on the console output as long as the verbose ini key is set.  Please refer to the following KB:

 

Configuring CompactRIO Real-Time Controllers to Synchronize to SNTP Servers 

 

Regards,

 

John Harvey

NI-RIO Product Support Engineer

Message 11 of 11
(379 Views)