12-08-2009 11:15 AM
Hi,
I've been trying to synchronize my cRIO-9014 to a NTP server on the Internet. It may work now, at least the RT-clock synchronizes when I reset my cRIO.
I doubt that the RT-clock is continuosly updated, because if I change time and/or date with"RT Set Date And Time.vi", the time/date won't be updated, ie synchronized to the server at the interval of 60 sec as default.
What is the best way to troubleshoot? If I enable log, ie set log to "true", timestamps will be logged to a file. But where could it be found?
Here is the time synch part of the "ni-rt-ini", which also can be seen in the attachment.
[TIME SYNC]
source_priority=sntp;rtc;
source.sntp.enable=true
source.sntp.address=62.119.40.98
source.sntp.interval=60
source.sntp.port=123
source.sntp.verbose=false
source.sntp.log=true
12-17-2009 08:32 AM
Hi,
the RT clock is synchronized in small steps to the timeserver during normal operation. Big time steps are only allowed once, when the very first synch happens during bootup. If you change the time after that it takes hours or even days to synchronize the clock against the timeserver because the time is corrected in us or ms upon each synch. Thats how ntp works.
The log file is located in system\ts_sntp_log.txt, but its not easy to read.
Regards,
Swen
01-20-2014 08:28 PM - edited 01-20-2014 08:52 PM
Hello:
I'm also facing some issues with NTP Time Sync. I'm developing a system that requires the host computer and the RT target clocks to be synchronized within a few milliseconds, less than 20 ms would be ideal. The system won't have access to the internet, so the objective is that the RT target syncs with the PC Clock using NTP. I have set up a NTP server in the host computer following the instructions described in "How Do I Configure My Host Computer as an NTP Time Server? " . In the NTP server, I have enabled the PC's clock as a source, with stratum 10. The NTP Time Server Monitor shows me the server is working properly.
The RT target is a sbRIO 9632 and I have performed the steps described in "How Do I Configure My CompactRIO Real-Time Controllers to Synchronize to SNTP Servers? " to enable NTP synchronization in the sbRIO. The corresponding section of my ni-rt.ini file is listed below:
[TIME SYNC] source.rtc.enable=True source_priority=sntp;rtc; source.sntp.enable=true source.sntp.address=10.0.0.100 source.sntp.interval=60 source.sntp.port=123 source.sntp.verbose=false source.sntp.log=true
The RT Target and Host Computer are connected directly with an Ethernet cable and I can communicate sucessfully between them. I have enabled NTP logging, as can be seen in the ni-rt.ini file, however, the log file which as far as I know should be in "c:\ni-rt\system\ts_sntp_log.txt" is not created, and that is worrying me, since I'm not sure that the clocks are syncing. I previously tried to sync the clocks with a call to the Set Time VI from the new RT System Configuration API, using the time of the PC as input, so I'm not sure if the small difference between the clocks is because of the NTP syncing or just a result of the previous Set Time VI call.
How can I debug the NTP clock sync process and be sure that the clocks are synchronizing correctly? Why may it be not logging?
The sbRIO has installed NI-TymeSync version 1.1.5, and I'm working with LabVIEW & LabVIEW RT 2012.
P.D. Why does the tutorial on configuring the Meinberg NTP server suggest not to create a configuration file? I was unable to make the server work until I created a config file.
Thanks in advance.
Robst - CLD |
Using LabVIEW since version 7.0 |
02-17-2014 02:29 PM
Hello:
Unfortunately, I still haven't figured out how to solve this issue, and the synchronization between the two clocks is still needed.
Does somebody know how to make NTP work with the sbRIO-9632?
Thanks in advance for your kind reply.
Best regards.
Robst - CLD |
Using LabVIEW since version 7.0 |
02-26-2014 11:12 PM
Hello:
Well, finally the issue was found after some suggestions from NI support. It was simply the firewall blocking the port 123, that is used by the NTP server. We had unblocked the port previously but it seems the rule did not survive a computer reboot. Now it is permanent and it seems the syncing is working.
Robst - CLD |
Using LabVIEW since version 7.0 |
03-17-2014 11:22 AM
I am having the same problem you had. Cannot sync. What else did you try? Followed the same steps you did. Did you run:
ntp-4.2.6p5@london-o-lpv-win32-setup.exe (2.80 MB)
NTP package with IPv6 support for XP / 2003 Server / Vista / Win 7 / Win Server 2008
and you did chhose to create a config file?
03-17-2014 11:23 AM
im using the cRIO 9076.
03-17-2014 11:44 AM
also, using 'quick ntp status' yields: no association IDs returned
Thanks
03-17-2014 01:33 PM
Hello Paul:
The NTP Setup file that I used is ntp-4.2.6-lpv-win32-setup.exe with a size of 3.59 MB. Yes, I created the configuration file, otherwise the NTP server would not work.
Make sure that you have enabled NTP syncing in the ini file in the cRIO. Also, make sure that you have installed in the cRIO the software package NI-TimeSync.
For me, the problem was solved when I added an exception in the Firewall, so that it would allow communication on port 123, which is the one NTP uses. As far as I know, NTP uses UDP, so open port 123 for UDP communication. I also allowed TCP communication, just in case. Make sure that the exception is permanent, so it holds after a system reboot.
Hope this helps.
Robst - CLD |
Using LabVIEW since version 7.0 |
03-17-2014 01:36 PM
after some research and trial and error, I figured it out. Sorry for all the unnecessary posts.