Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO-9076 Time Synchronization

I have a cRIO running various hardware processes that are not very demanding.  Every hour or so, I do something that requires timestamping on the cRIO with millisecond precision.  This part works fine.  However, I would like this to be synchronized to the system time on a computer that talks to the cRIO.  For this, a precision of a few seconds (usually more) is fine.  So, I just need the cRIO to keep itself reasonably synchronized with a time server.

 

However, I cannot get the cRIO implementation of SNTP to work.  I followed the instructions at http://digital.ni.com/public.nsf/allkb/F2B057C72B537EA2862572D100646D43, then I installed TimeSync thinking it might help me.  I disabled Ptp after doing this, since that is not what I want, both using the ni-rt.ini file and using MAX.  No synchronization sources other than Ptp have ever appeared in MAX, and I can't find any documentation that suggests whether this is a problem.  The cRIO continues booting to 4 pm on December 31, 1969 (I am in the Pacific time zone), so clearly synchronization is not working.  I would like to check the SNTP log, but it is missing.

 

What am I doing wrong?  The current version of my ni-rt.ini file is attached, as is a screenshot of MAX shortly after a restart.  For now I am setting the time manually on startup, but I need a solution that does not depend on me or a particular computer being present when the cRIO reboots.

Download All
0 Kudos
Message 1 of 10
(4,125 Views)

HI stephencox,

 

The cRIO reboots to 4 pm on December 31, 1969 even if you do not  follow the synchronization process? Or this only happens when this is active?

 

Do you have some kind of antivirus or firewall currently active?

0 Kudos
Message 2 of 10
(4,080 Views)

The cRIO does not seem to react to my attempts at following the synchronization process.  It reboots to 4 pm on December 31, 1969 regardless.  I guess this makes sense in ptp mode, since it is the only ptp device and therefore becomes the master (I don't know much about ptp), so for all I know that works.  But I turned it off because I want to use sntp.

 

I am at a university, so I don't have complete control over Internet security.  However, I assume that if the cRIO were trying to look up a server, it would be writing to the log that that NI article says should be written.  It doesn't exist, and MAX says nothing about anything but ptp.  Also, the computers that access the Internet through the same router that connects to the university network have no trouble syncing with the same time server.

0 Kudos
Message 3 of 10
(4,075 Views)

Is that the only cRIO that you have access? Can you test it directly to the computer and without internet access? We have seen some previous customer with similar issues and is related to the security.

0 Kudos
Message 4 of 10
(4,064 Views)

This is our only cRIO.  I can set up a local computer as an ntp server and see what happens.  Of course, I'm not doing that now, so now I'm introducing more unknowns to the situation, and I won't know what to blame if it doesn't work.

 

Why am I not getting a log?  Why doesn't sntp show up as a synchronization option in MAX?  It would be a lot easier to troubleshoot this if I could see an error message somewhere, or if I knew that there would be one if it was configured correctly.

0 Kudos
Message 5 of 10
(4,059 Views)

I set up, as far as I know, a local computer to act as an ntp server and changed the IP address for the server on the cRIO ini file to that computer's IP address on the LAN.  No change--the cRIO still boots to 1969 and does not change.  Still no log file.

 

I am pretty sure this should be working on the Windows box end.  Windows firewall is disabled.  Windows Time configuration is below.

 

C:\WINDOWS\system32>w32tm /query /configuration
[Configuration]

EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 10 (Local)
MaxPollInterval: 15 (Local)
MaxNegPhaseCorrection: 54000 (Local)
MaxPosPhaseCorrection: 54000 (Local)
MaxAllowedPhaseOffset: 1 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 1 (Local)
UpdateInterval: 360000 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\WINDOWS\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 604800 (Local)
Type: NTP (Local)
NtpServer: nist-time-server.eoni.com,0x9 (Local)

NtpServer (Local)
DllName: C:\WINDOWS\system32\w32time.dll (Local)
Enabled: 1 (Local)
InputProvider: 0 (Local)
AllowNonstandardModeCombinations: 1 (Local)

0 Kudos
Message 6 of 10
(4,058 Views)

Did you checked this forum? Perhaps you can use one of the IP from that list, just to verify if it doesn´t work with an external server.

 

http://forums.ni.com/t5/LabVIEW/How-do-I-setup-cRIO-SNTP-Time-Sync-in-MAX/td-p/1411132

0 Kudos
Message 7 of 10
(4,050 Views)

We seem to be going in circles.  The whole point of this post is that it doesn't work with an external server.

0 Kudos
Message 8 of 10
(4,044 Views)

Hi Stephen,

 

I would like to advice you to contact NI support either by email or by phone. It is pretty courious that if you follow the process in the knowledge base articule doesn´t work. Since this is a very specific issue it would be better if you contact directly NI support and that way you would have a dedicated Applications Engineer working with you specifically in this particular issue and working with you to find a solution.

 

Even without the sync SNPT lines on the rt ini file the RIO reboots on a wrong date which is pretty strange. Changing the time manually does work? or when boots always has the wrong value?

 

0 Kudos
Message 9 of 10
(4,037 Views)

Hello everyone

 

I have the same problem as describeded with the plus that when i put the time sync in .ini file the access to the files by webDAV are with a bad request error.

 

This is very strange and i dont know why this is hapening...

André Simões
Work with LV2019 and cRIO since 2021
0 Kudos
Message 10 of 10
(616 Views)