LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I setup cRIO SNTP Time Sync in MAX

Solved!
Go to solution

I am trying to have my cRIO-9022 automatically sync with my network time server using SNTP. I have read the KB on how to add the SNTP code into the ni-rt.ini file found here: http://digital.ni.com/public.nsf/allkb/F2B057C72B537EA2862572D100646D43?OpenDocument

 

I have LV 2010 and have installed NI TimeSync 1.1 on the cRIO.

 

According to figure 2 in this whitepaper entitled "Timing and Synchronization in NI LabVIEW", this time sync with SNTP functionality can appear in MAX. 

http://zone.ni.com/devzone/cda/tut/p/id/11466

 

I have been unsuccessful at achieving this, any ideas?


Thanks

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 1 of 20
(9,576 Views)

Hi Jim,

 

While it wasn't easy to find, there is a beta of TimeSync 1.2 available that has the SNTP plugin included within. After you install that on your computer, you'll be able to choose the NI-TimeSync Plugin when you do a custom software installation on your target.

Hope this helps,

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 2 of 20
(9,544 Views)

Fred_V

 

Downloaded the beta as you suggested, installed on the cRIO and was able to see "SNTP" show up in MAX. However, there are no "advanced options" (i'm guessing where the SNTP server address would be entered) available as shown in Figure 2 of my previous post.

 

 I followed the instructions for setting the SNTP server address in the .ini file, but was unable to have the cRIO sync with the local network server that my computer in sync with, or with the NIST.gov time server.

 

 

Any ideas? Has anyone been able to get this functionality to work before?

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 3 of 20
(9,530 Views)

Hi Jim,

 

I was able to successfully synchronize the cRIO by modifying the .ini file using a NIST SNTP server (I used 132.163.4.103 - from this list), rebooting the cRIO, and waiting a couple minutes until they synchronized. 

Did you reboot the controller after you modified the .ini file? Did you try another external SNTP server? 

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 4 of 20
(9,511 Views)

Fred_V

 

I did make sure to reboot the controller after each time of updating the .ini file. let it run for a while, still no change.

 

I also tried the SNTP server you used, with no luck. I will have to check with my network admin. to see if perhaps there is a port being blocked. Do you have any more technical details on how this service is supposed to operate?


Thanks

 

 

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 5 of 20
(9,503 Views)

Hi Jim,

 

It's my understanding that the SNTP plugin functions similarly to the native SNTP functionality in most operating systems. However, since this plugin is still (a feature-incomplete) beta, I would like to make sure that if you've run into a bug, that we can document and fix it. 

 

Could you post your SNTP .ini file? If you find that your network is working correctly, would you be interested in making an image of your Real-Time controller and uploading that to ftp.ni.com/inocoming, so that I could try and reproduce the issue?

Kind regards,

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 6 of 20
(9,482 Views)

Here is my .ini file.

 

I will work on getting a disk image.

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 7 of 20
(9,469 Views)

Hi Jim,

 

I was able to and set up a second cRIO with the SNTP TimeSync plugin, and I used your .ini file. One thing I did notice, was that after downloading the file, there wasn't a line break between the 2 parameters in the .ini file. I copied the file over, and as expected the incorrectly formatted .ini file didn't work correctly. However, adding the line break and saving the file did work correctly. 

 

After making the change and rebooting the controller. I waited 5 minutes then refreshed the Time Settings tab in MAX; the Current Time updated to the correct time.

Could the .ini file formatting be related to your issue, or was that simply an artifact of uploading to the web?

 

 

[TIME SYNC]
source.sntp.address=132.163.4.103
source.sntp.timekeeperSynchronizationThreshold=0.01

 

 

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 8 of 20
(9,445 Views)

Fred_V

 

I fixed my .ini file, it did not contain the line breaks so i used the enter key to add a return. Still no connectivity.

 

I checked with my network admin and we unblocked the time.windows.com (207.46.197.39) NTP address which is what the main server updates with. We observed the cRIO polling that address and getting through the firewall, but still do not have the cRIO updating time.

 

I have uploaded a Disk Copy of my cRIO to ftp.ni.com/incoming as you suggested. The file name is "cRIO Disk Image_SNTP cRIO.zip". please take a look at it.

 

-JimMacD

--------------------------------------------------------------------------------------------------

--CLD--
LV 6.1 to 2015 SP1
0 Kudos
Message 9 of 20
(9,433 Views)
Solution
Accepted by topic author JimMacD

Hi Jim,

 

I setup TimeSync on another cRIO, and similarly I wasn't able to use the time.windows.com (207.46.197.39) IP address you used in your ini file. I was however able to change that IP to the previous (132.163.4.103) and it worked correctly. 

I'll file a bug report on the Microsoft time server, to better understand why that might be happening, but could you similarly validate that the 132.163.4.103 address can make it through your firewall?

I'll also try to track down a cRIO-9022 and test your image; I'll let you know if I run into trouble.

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 10 of 20
(9,415 Views)