Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Date time synchronisation with NTP service cDAQ 9138

Hello,
I'm trying to connect our new cDAQ-9138 realtime controller to an NTP service. But in MAX I can only find the option to set the date time function manually. I searched a while in the forum about this topic, but couldn't find any post about it. Maybe it's too obvious and simply, but didn't find the option yet in the settings of the controller.
I have MAX 5.5.1 and NI DAQmx driver 9.8 installed. I looked into the "network settings" and the "time settings" of the remote device...without success
I'm happy for any hint!
Thanks and have a good start into 2014!
Olli

0 Kudos
Message 1 of 3
(6,746 Views)

Hello Olli,

 

Have you tried following the instructions given in this thread and KB to add the SNTP support?

Message 2 of 3
(6,641 Views)

Hello amezam,

thank you very much for your useful information! I tried it, but somehow I don't get it working. That are the lines I included in the ni-rt.ini:

 

[TIME SYNC]
source_priority=sntp;rtc;
source.sntp.enable=TRUE
source.sntp.address=time.nist.gov
source.sntp.interval=60
source.sntp.port=123
source.sntp.verbose=false
source.sntp.log=TRUE

 

I tried it also with another working NTP server IP address instead of the global address, which resolves to a valid address on a list of servers (a quite smart idea)...see useful infos at the NIST internet time service website

 

The error message that I receive after booting the device is the following:

 

unable to load time sync source: sntp (unable to load time source server).

 

My currently working but not very elegant solution is now to connect one of the time.nist.gov servers using TCP IP and then use the received timestamp to update the system time wit a VI. I slightly modified an existing VI, that I downloaded here. Now you can type the global server name and the IP address of one particular NTP server is resolved for the use with the TCP/IP open VI. (it's the VI "Set RT System Clock by NTP Server 20140108_V0.02.vi" in the attached llb)

 

This method is not very accurate I suppose, but my required accuracy of the time stamp could be about +-1 second.

 

I wonder why NI didn't provide the NTP service directly in the time settings in MAX for all realtime controllers. However, I keep on collecting information about the subject "time synchronisation". Within most of our measurement applications, it's essential to have an absolute correct time stamp, because our data sources are comming from different measurement networks and controll systems.

 

Greestings!

Olli

 

 

 

0 Kudos
Message 3 of 3
(6,602 Views)