Salve sto cercando di sincronizzare un Mps046_XTarget_12_0 Runtime sistema: 1.10.3 con un server NTP ma non riesco ad ottenere risultati. Ho provato tutti i server it.ntp.pool.org inrim.it europe.pool.ntp.org senza successo, ecco il codice che utilizzo.
SNTPReq(NTPServer:=ADR(server),Query:=LookFor AND EnableNTP,SpyOn:=TRUE);
IF (SNTPReq.Done) THEN
IF (SNTPReq.Ok) THEN
i:=SysSetUTCDateTime(SNTPReq.UTCTime);
LookFor:=FALSE;
bFound:=TRUE;
END_IF;
IF (SNTPReq.Fault) THEN
LookFor:=FALSE;
changeserver:=TRUE;
END_IF;
END_IF;
Ecco il risultato dello Spy:
10:25:24(9999)|Lg|-------------------------------------------[Start NTP request]-
10:25:39(9999)|Er|UDP Client error:09943135
10:25:39(0014)|Er|Error:10052110