Skip to content

Setup NTP Sync

MasterPC NTP Server configuration

By default the NTP server should be already configure during the OneClick install. If not ensure the following properties are set in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer

Set the Enabled property to 1.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

Set the AnnounceFlags property to 5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Set the Type property to NoSync.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

Set the LocalClockDispersion property to 0.

Restart the NTP server with following commands from powershell:

net stop w32time && net start w32time

It is possible that the settings are being forced by a Windows Group Policy (GPO)—likely from your IT department or a Domain Controller. Even if you change the Registry manually, the Policy overwrites it instantly. In that case do the following:

Step 1: Open the Policy Editor

  • On the Windows PC, press Windows Key + R.
  • Type gpedit.msc and press Enter.

Step 2: Navigate to Time Service Settings

  • In the left-hand pane, navigate to:
    Computer Configuration > Administrative Templates > System > Windows Time Service

Step 3: Change Global Configuration

  • Click on the Windows Time Service folder (not the sub-folders).
  • On the right, double-click Global Configuration Settings.
  • Set it to Enabled.
  • In the options list, find AnnounceFlags and change the value to 5.
  • Click Apply and OK.

Step 4: Configure Time Providers

  • In the left pane, go one level deeper into the Time Providers folder.
  • Double-click Enable Windows NTP Server and set it to Enabled.
  • Double-click Configure Windows NTP Client:
  • Set it to Enabled.
  • Set Type to NoSync (this forces the local CMOS clock to be the master)

Step 5: Force the Update

  • Open Command Prompt (Admin).
  • Run the following commands:

PLC NTP Client configuration

To enable NTP server synchronization on Beckhoff PLC edit the following configuration in /etc/rc.conf :

ntpd_enabled="YES"

and following configuration in /etc/ntp.conf :

tos maxdist 30
server 192.168.201.1 iburst

Replace 192.168.201.1 with your Master PCs IP adress.

Run :

ntpq -p

correctly setup NTP should have the following output :

============================================================================== *192.168.203.1 .LOCL. 1 u 7 64 1 0.163 -14.210 2.474