Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

NTP server synchronized error


john,park Sep 4, 2024 03:23 AM

logger : cr6

ntp server : Protempis Thunderbolt NTP Time Server Clock TS200

I'm trying to synchronize the logger's time with the ntp server.

But the time synchronization is not working.

CRBasic source code

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

SlowSequence

Public TimeOffset As Long

  Scan (1,Sec,3,0)

  'Scan (1,Min,100,0)

    'If IfTime(750,1440,Min) Then

      TimeOffset = NetworkTimeProtocol ("192.168.5.250", 32400,1000)

    'EndIf

  NextScan

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

The computer is synchronized with the NTP server.

When I check the computer time and the logger time with LoggerNet, the actual time is more than 5 seconds different.

The time is not synchronized and the offset value is displayed as follows.

TimeOffiset value is -2 or -3 or -4

and I confirmed that the value true is returned when requesting PingIP() to the NTP server.

can you hemp me?


john,park Sep 6, 2024 01:38 AM

variable = NetworkTimeProtocol ( NTPServer, NTPOffset, NTPMaxMSec )

32400 is not a port number. It is a value expressed in seconds from local time +9.

The ntp server does not input a port number because it uses the default 123.

I tried this too, but the result is the same.
The time did not change.

TimeOffset = NetworkTimeProtocol ("192.168.5.250", 0,1000)

TimeOffset = NetworkTimeProtocol ("192.168.5.250", 0,10)

Log in or register to post/reply in the forum.