Hello,
I tried to put a NTP isntruction in a cr1000 program and it doesn't seem to work.
Here my code, note that the commented part is my first attempt to make a synchronisation, didn't work better.
'Main Program BeginProg 'Main Scan Scan(10,Sec,1,0) 'Default CR1000 Datalogger Battery Voltage measurement 'BattV' Battery(BattV) 'Default CR1000 Datalogger Wiring Panel Temperature measurement 'PTemp_C' PanelTemp(PTemp_C,_50Hz) 'Generic Differential Voltage measurements 'bat_voltage' VoltDiff(bat_voltage,1,mV5000,1,True,0,_60Hz,1,0) '107 Temperature Probe measurement 'T107_C_bat' Therm107(T107_C_bat,1,3,1,0,_50Hz,1,0) 'Call Data Tables and Store Data CallTable laur_decharge_simu CallTable soh NextScan Scan (30,Sec,3,0) If IfTime (0,30,Sec) Then TimeOffset = NetworkTimeProtocol ("192.168.1.2", 0,1000) EndIf NextScan ' SlowSequence ' Scan (10,Sec,3,0) ' NetworkTimeProtocol ("192.168.1.2",0,1000) 'synchro sur la centaur ' EndSequence ' NextScan EndProg
Don't really know how to do it in a different way.
You are pointing the logger to a local IP address as a NTP server. I assume that would be the modem. It would only work if the modem has a NTP server enabled.
Accuracy will depend a lot on the latency of the cellular connection.
If not getting the desired accuracy with NTP, a GPS attached direct to the datalogger is recommended.
You're right, it's a local device that have a GPS synchro (a seismic digitizer) with extreme accuracy.
But, for some reason, even if I set the NTP sharing on the digitizer, pointing on it don't work (I think the manufacturer have specific protocol to sharing NTP with other digitzer only).
So just before the weekend I used the cell router modem as NTP server and this morning I just see that is work perfectly (with the slow sequence script version, didn't try with the one I posted uncommented here).
So it was not a Campbell problem...
And you're right to mention that the accuracy of the cell modem is not very stable but I only need something not to drift in month of measure, all the year (1 to 5 secondes is enought for me).
Thanks for your answer.