Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Configuring CompactRIO Real-Time Controllers to Synchronize to SNTP Servers

Primary Software: LabVIEW Modules>>Real-Time Module
Primary Software Version: 8.2
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: CompactRIO>>Controllers>>cRIO-9002, CompactRIO>>Controllers>>cRIO-9004, CompactRIO>>Controllers>>cRIO-9012, CompactRIO>>Controllers>>cRIO-9014

Problem:
Is it possible to configure CompactRIO Real-Time controllers to use an SNTP or other time server?

Solution:

As of LabVIEW Real-Time 8.6, CompactRIO Real-Time controllers can be configured to synchronize to SNTP servers. 

To configure the controller to synchronize to an SNTP server, add the following lines to the ni-rt.ini file of the controller. You will need to FTP this file onto a Windows machine, make the changes, and FTP the modified file back to the controller.  After updating the ni-rt.ini file and rebooting, the cRIO controller will automatically implement synchronization to the SNTP server.

[TIME SYNC]
source_priority = sntp;rtc;
source.sntp.enable = true
source.sntp.address = 10.0.58.1
source.sntp.interval = 60
source.sntp.port = 123
source.sntp.verbose = false
source.sntp.log = false

The following table describes the .ini tokens:

Token Type Default Importance Description
source_priority string sntp REQUIRED Lists the relative priority of installed time sync plug-ins. For cRIO, the possible options are rtc, dio, and sntp.
source.sntp.enable bool false REQUIRED Set to true to enable the sntp time sync plug-in. Set to false to disable.
source.sntp.address string 0.0.0.0 REQUIRED Specifies the ipv4 address of the SNTP time server. Use "." delimited address. Using a named address, like "pool.ntp.org" does not work at this time.
source.sntp.interval int 60 Recommended By default the SNTP client driver sleeps for an interval between successive time server polls. Set a new delay, specified in seconds, to adjust the interval.
source.sntp.port int 123 optional By default SNTP uses a known port to contact the time server. Set a new port number if the time server is on a non-standard port.
source.sntp.verbose bool false optional By default SNTP client driver errors are silently discarded. Set to true to enable verbose errors.
source.sntp.log bool false optional Set to true to log timestamps to a file. This should only be used for debugging purposes.

The SNTP is a simplified subset of the Network Time Protocol (NTP). For more information on SNTP refer to RFC 2030.  Addtional options for other Time Servers can be found in the related links section below.



Related Links:

Developer Zone: PXI TIME Setting
Developer Zone: Synchronizing Multiple CompactRIO Chassis
Developer Zone: Set Date and Time on PC, PXI, and PXI-RT Using DAYTIME Protocol
Developer Zone: Getting/Setting the System Date/Time on CVS, PXI RT Targets
External Link: NIST Internet Time Servers
KnowledgeBase 493BIHLX: Using the SMB Connector for Digital I/O or Drift Compensation on cRIO-901x and 9074 Controllers



Attachments:





Report Date: 05/04/2007
Last Updated: 09/03/2008
Document ID: 493C8ELX

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit