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.

Time Synchronizing Field Dataloggers


wx2day Mar 14, 2012 12:07 PM

How do other users keep their fielded datalogger(s) in a network time synchronized? I have a base datalogger that has a GPS antenna and this time synchronizes just fine. That base datalogger has 10 other field stations that communicate via pakbus RF network. Those 10 stations have no GPS antennas and thier time drifts.

Any efficent ideas on how to synchronize this network
without creating constant radio traffic?


Thank You,

wx2day


Andrew,

Thank You for taking the time to answer. I have one additional concern. When I observe the transaction and communication logs in status, I see a continuing clock check every second. It appears the base logger radio is continually transmitting to the field. Is this normal? Would this interfere with other data that is say a 3 sec running average updated every second? It would be nice if the base logger would only communicate say 1X per day and set the clocks in the field and then stop. Would you have any examples of CRBASIC code that would accomplish this?

Thank You,

wx2day

* Last updated by: wx2day on 3/14/2012 @ 10:12 AM *


aps Mar 14, 2012 12:20 PM

Use the Clockreport in the master (time) logger and PakbusClock commands in the slave loggers. You can use the option to broadcast to all (providing no routing is needed) which means this is just one packet of info sent.

You can call the clockreport instruction as often as you wish, although for practical purposes once or twice a day should be adequate for most apps.

It is not worth going much faster because the logger clocks drift little, also there may be some jitter on the timing of the clock setting because of the RF network. In addition setting the clock too often can interfere with data storage - it is best to minimise this by setting the clock away from the times the loggers are due to store data.


wx2day Mar 15, 2012 11:13 AM

Andrew,

Thank You for taking the time to answer my question. I have one additional concern. When I observe the transaction and communication logs in status monitor, I see a continuing clock check every second. It appears the base logger radio is continually transmitting to the field. Is this normal? Would this interfere with other data that is say a 3 sec running average updated every second? It would be nice if the base logger would only communicate say 1X per day and set the clocks in the field and then stop. Would you have any examples of CRBASIC code that would accomplish this?

Thank You,

wx2day


aps Mar 15, 2012 12:00 PM

If you used Clockreport and just put it in the main scan it will execute every time the scan runs. To run it say once per day use an IF statement with timeintointerval, e.g.

IF TimeIntoInterval (3,1440,min) THEN ClockReport (ComSDC7,0,4095)

This will send the clockreport out at 3 mins past midnight (hopefully away from a data storage time). The parameters used in Clockreport sends the message out via SDC7 (to which the RF416 may be attached) to all loggers.

If you have already done this make sure you are not getting confused by Clockcheck messages that Loggernet is sending to any logger it is communicating with via the connect screen. It will send that message to get the current logger time to update the PC screen.


wx2day Mar 15, 2012 01:41 PM

Thank You Andrew! Yes I was getting confused by the connect screen as it constantly check the station when connected. It looks like this will work and resolve any issues we were experiencing regarding the timing of the fielded stations.

Thanks again! wx2day


wx2day Mar 15, 2012 04:59 PM

Andrew-- I've had success for setting time to one station logger but not more then 1. Here is my setup. Does this code look correct? wx2day

4077 = PC

4020 = Base Logger's Pak Bus Address

Pak Bus: 201 = 1st Station = CR1000

Pak Bus: 202 = 2nd Station = CR1000

Pak Bus: 203 = 3rd Station = CR1000

Base Loggers Program:
SequentialMode
PreserveVariables

' Public Variables
Public GPS(15)
Public NMEA_Sentences(3) As String * 96


' Units
Alias GPS(1) = Latitude_Deg
Alias GPS(2) = Latitude_Min
Alias GPS(3) = Longitude_Deg
Alias GPS(4) = Longitude_Min
Alias GPS(5) = GPS_Speed
Alias GPS(6) = Course
Alias GPS(7) = Variation
Alias GPS(8) = FixQuality
Alias GPS(9) = Satellites
Alias GPS(10) = Altitude
Alias GPS(11) = PPS_Usec
Alias GPS(12) = LastValidRMC_sec
Alias GPS(13) = GPSReady
Alias GPS(14) = MaxClockChange
Alias GPS(15) = ClockChangeCount

'Define Data Tables
DataTable(GPSClockInfo,True,250)
DataInterval(360,1440,Min,10)
Sample(1,ClockChangeCount,Long)
Sample(1,FixQuality,Long)
Sample(1,Satellites,Long)
Sample(1,PPS_Usec,Long)
Sample(1,LastValidRMC_sec,Long)
EndTable


'Main Program
BeginProg


Scan (5,Sec,0,0)


GPS(GPS,Com4,-5*3600,50,NMEA_Sentences())

CallTable(GPSClockInfo)

If TimeIntoInterval (725,1440,Min) Then
ClockReport (ComRS232,0,4095)
'Call SynchClocks
End If

NextScan
EndProg

FIELD STATION'S Program

BeginProg
Scan (1,Sec,3,0)
PakBusClock (4020)
NextScan
EndProg


aps Mar 15, 2012 05:15 PM

Can I check the loggers are not acting as a chain of repeaters and they can all "hear" the "base loggers".

If not can you try setting the base logger to an address less than 4000 as addresses above that are really reserved for servers and might just be confusing the issue.


wx2day Mar 16, 2012 01:06 AM

Andrew--

I found my problem. The PC I was using to determine the interval was daylight time and the base logger was standard time. I was 60 minutes ahead when testing in the interval command for the clock report. As a result, it wasn't happening until I discovered it and backed it off - 60 min. As soon as I did, the clock report transmitted and all field loggers responded accordingly. It worked like a champ.

You can use the addresses above 4000 and it will work. In station status you will get an error but it will work reliably.

Would you know of a way of changing constants in a program from an RTMC screen input box similar to public variables in a CR1000 program?

Thanks for all your valuable advice!

wx2day

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