Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
11 ratings:
 4 out of 5   

How Do I Configure My Windows Host Computer as an NTP Time Server?



Primary Software: Driver Software>>NI-WSN
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Wireless Sensor Network>>WSN Gateways>>NI WSN-9791

Problem:
I need my NI WSN-9791, NI 9792, Smart Camera, or CompactRIO controller to return the current time but I have no connection to a public Network Time Protocol (NTP) time server. How can I configure my host computer to act as a time server?

Solution:
The default Windows time server (w32time) does not work for most NI distributed hardware because it is based on version 3 of the NTP standard but the hardware requires RFC 2030 - Simple Network Time Protocol (SNTP) version 4. In order for your host computer to provide the proper time server commands, you must upgrade the NTP service. There is an open standard that you can download and install per the instructions below for computers with a Windows Operating System.
  1. Download the Meinberg NTP Software compatible with your OS version here.
  2. Open and run the installer.
  3. Navigate through the installer. When prompted to Choose Components, select to install all components and then select Next. The software will then be installed.



  4. Once installation is complete, you will be prompted to set configuration settings. Uncheck the Create an initial configuration file with the following settings option. Select Next.


  5. A warning will appear warning that the configuration file chosen does not exist. Select Yes.



  6. You will then be prompted to specify service settings. Under NTP Service Settings, select the radio button labeled Use SYSTEM account. Ensure that all options are enabled as needed, and select Next.



  7. If you see a warning that the configuration file does not exist yet. Select OK.
  8. Select Finish.
  9. When the installer is finished, verify that the NTP server is started by selecting Start»All Programs»Meinberg»Network Time Protocol»Service Control»Start NTP Service. (If you receive Error 5 when trying to run this file, try right-clicking on it and selecting Run as administrator.)
  10. Obtain the IP address of your PC. Open a command prompt in Windows by going to Start»All Programs»Accessories»Command Prompt. In the command prompt that opens, type ipconfig. The IPv4 Address returned is the IP address you will use in the next step.
  11. Configure your NI hardware to point to this NTP server. The method for doing this will depend on the type of hardware you are using. See the sections below for more information.
Note: You may need to configure your firewall to allow inbound and outbound access to ntpd.exe and ntpq.exe in order for your Windows PC to act as an NTP server to clients.


Configuring NI WSN-9791, NI 9792 or Smart Cameras as NTP Clients
  1. Open NI MAX and open the settings for your hardware.
  2. Enter your host PC's IP address to be used as the Time Server.
  3. Apply the settings and reboot the NI hardware.
Configuring CompactRIOs as NTP Clients
Modify the (S)NTP configuration file used by your implementation for NTP. Below are a few examples:

If your host computer uses Linux, install the NTP package from the package manager of your choice and follow the above instructions starting at step 11.

Your NI hardware should now be able to pull time server information from your host computer.

Related Links:
Meinberg NTP Software Downloads
KnowledgeBase 4XKA7THN: How Do I Configure My Time Server on the NI WSN-9791 or NI 9792 Gateway?
KnowledgeBase 493C8ELX: How Do I Configure My CompactRIO Real-Time Controllers to Synchronize to SNTP Servers?
External Link: RFC 2030 - Simple Network Time Protocol Version 4
External Link: Setting up NTP on Windows
NI Community: Installing and Configuring NTP on NI Linux Real-Time Devices

Attachments:





Report Date: 07/09/2009
Last Updated: 04/01/2016
Document ID: 4Z88FBHN

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