Legacy Hardware and Apps
Synchronizing time between two DT800

Hi,

I have two DT800's out in the field which are being used to log wind data at 5 Hz over a period of several weeks. Each logger is taking half of the measurements and the plan was to later combine the two data sets.

However, I have just being processing the first months worth of data and have found that there appears to be a significant time drift between the clocks of the two loggers.

This seems to be as much as 7 minutes per day which seems rather high! This is making it very difficult to combine the two sets of data as a common time base (to around 0.2sec) is essential.

I am therefore looking to synchronize the two clocks and thought about using a serial connection from the serial port on the front of the 'master' logger into the host port on the 'slave' logger.

I have put together a simple schedule to take the hours minutes and seconds from master logger and send these as a 'set time' command to the slave logger. But I'm having a little trouble getting the syntax correct. Could someone please help?!?

Here's what I have:

PS=57600,N,8,1,NOFC 
RD10M LOGOFFD GD 
3ST("Get hours",W,=101CV) 
2ST("Get minutes",W,=102CV) 
1ST("Get seconds",W,=103CV) 
1SERIAL(RS232,"{T=%d[101CV]:%d[102CV]:%d[103CV]}")

Is that syntax correct? It doesn't seem to be working at the moment but I'm not sure why. Hardware wise, I have made the following connections (master serial to slave host ports): Gd to PIN5, T- to PIN3, R- to PIN2. Also PIN7 and PIN8 are connected together on the slave host port.

Any help much appreciated! Thanks,
James

Hi, I have two DT800's out in the field which are being used to log wind data at 5 Hz over a period of several weeks. Each logger is taking half of the measurements and the plan was to later combine the two data sets. However, I have just being processing the first months worth of data and have found that there appears to be a significant time drift between the clocks of the two loggers. This seems to be as much as 7 minutes per day which seems rather high! This is making it very difficult to combine the two sets of data as a common time base (to around 0.2sec) is essential. I am therefore looking to synchronize the two clocks and thought about using a serial connection from the serial port on the front of the 'master' logger into the host port on the 'slave' logger. I have put together a simple schedule to take the hours minutes and seconds from master logger and send these as a 'set time' command to the slave logger. But I'm having a little trouble getting the syntax correct. Could someone please help?!? Here's what I have: ```` PS=57600,N,8,1,NOFC RD10M LOGOFFD GD 3ST("Get hours",W,=101CV) 2ST("Get minutes",W,=102CV) 1ST("Get seconds",W,=103CV) 1SERIAL(RS232,"{T=%d[101CV]:%d[102CV]:%d[103CV]}") ```` Is that syntax correct? It doesn't seem to be working at the moment but I'm not sure why. Hardware wise, I have made the following connections (master serial to slave host ports): Gd to PIN5, T- to PIN3, R- to PIN2. Also PIN7 and PIN8 are connected together on the slave host port. Any help much appreciated! Thanks, James

Hi James,

the clock in the DT800 is the same as those used in a PC computer, so the accuracy is about +/- 4 minutes per day. (The clock in the DT80 is different and has an accuracy of +/- 1 minute per year, so would be much better for this job)

I think your problem is that you haven't terminated the command with a carriage return add ^M^J to the end of the line you transmit.

e.g

1SERIAL(RS232,"{T=%d[101CV]:%d[102CV]:%d[103CV]^M^J}")

Cheers,
Roger

Hi James, the clock in the DT800 is the same as those used in a PC computer, so the accuracy is about +/- 4 minutes per day. (The clock in the DT80 is different and has an accuracy of +/- 1 minute per year, so would be much better for this job) I think your problem is that you haven't terminated the command with a carriage return add ^M^J to the end of the line you transmit. e.g ```` 1SERIAL(RS232,"{T=%d[101CV]:%d[102CV]:%d[103CV]^M^J}") ```` Cheers, Roger

Hi Roger,

Thanks for that. Funny you should mention the DT80 option - we actually started off with a DT85 for this job but found that we couldn't get anywhere near the measurement rate.

I think I managed to get it up to about 2-3 Hz max. using all the channels with analog inputs whereas we needed at least 5Hz. Therefore we were advised to swap the Dt85 for 2x DT800 as these sample faster and we needed about 50 analog inputs plus various digital I/O's.

Anyway, I've just thought of another potential issue on which I would be grateful for your advice: If the slave logger is lagging behind the master and it's time gets updated over the midnight period (say from 11:59 pm to 0:00 am) is this likely to affect the date rollover?

My intention is that the master will send the time update string via the serial link every 10 minutes, so at midnight it will send T=00:00:00 to the slave. Will the slave logger realize that this is bringing the time forward into the next day (and hence roll the date forward accordingly) or will it think time has been rolled back to the beginning of the same date (and hence not increment the date)?

I was therefore thinking that it may be sensible to set the date as well as time just in case, but am again struggling with the syntax. From what I can gather from the manual, the string should be:

DT=[YYYY/MM/DD,hh:mm:ss]

Hence I think my program should be something like:

RD10M LOGOFFD GD
4ST("Get date",W,=100CV)
3ST("Get hours",W,=101CV)
2ST("Get minutes",W,=102CV)
1ST("Get seconds",W,=103CV)
1SERIAL(RS232,"{DT=[%f[100CV],%d[101CV]:%d[102CV]:%d[103CV]^M^J]}")

Are the square brackets that are required to enclose the whole date+time string going to confuse things (i.e. be interpreted as a [CV] sort of command)? I've put the date as a real number (%f) as I understand it will be stored as a decimal number of days since x. Is this correct?

Sorry to have to ask so many tricky questions in one post - hope they all make sense. Your help is much appreciated!

Regards,
James

Hi Roger, Thanks for that. Funny you should mention the DT80 option - we actually started off with a DT85 for this job but found that we couldn't get anywhere near the measurement rate. I think I managed to get it up to about 2-3 Hz max. using all the channels with analog inputs whereas we needed at least 5Hz. Therefore we were advised to swap the Dt85 for 2x DT800 as these sample faster and we needed about 50 analog inputs plus various digital I/O's. Anyway, I've just thought of another potential issue on which I would be grateful for your advice: If the slave logger is lagging behind the master and it's time gets updated over the midnight period (say from 11:59 pm to 0:00 am) is this likely to affect the date rollover? My intention is that the master will send the time update string via the serial link every 10 minutes, so at midnight it will send T=00:00:00 to the slave. Will the slave logger realize that this is bringing the time forward into the next day (and hence roll the date forward accordingly) or will it think time has been rolled back to the beginning of the same date (and hence not increment the date)? I was therefore thinking that it may be sensible to set the date as well as time just in case, but am again struggling with the syntax. From what I can gather from the manual, the string should be: ```` DT=[YYYY/MM/DD,hh:mm:ss] ```` Hence I think my program should be something like: ```` RD10M LOGOFFD GD 4ST("Get date",W,=100CV) 3ST("Get hours",W,=101CV) 2ST("Get minutes",W,=102CV) 1ST("Get seconds",W,=103CV) 1SERIAL(RS232,"{DT=[%f[100CV],%d[101CV]:%d[102CV]:%d[103CV]^M^J]}") ```` Are the square brackets that are required to enclose the whole date+time string going to confuse things (i.e. be interpreted as a [CV] sort of command)? I've put the date as a real number (%f) as I understand it will be stored as a decimal number of days since x. Is this correct? Sorry to have to ask so many tricky questions in one post - hope they all make sense. Your help is much appreciated! Regards, James

Good morning James,

If you change the time then yes it can affect a date change if the time is set near midnight. i.e. If the time / date has just rolled over to the next day and you set the time back to just before midnight then the date will roll over again when the time reaches midnight again.

You are quite correct the DT time date set format need the [] to work.
the [] tells the dataTaker the time and date format is ISO. (Tip: Use \091 and \093 to put them in the string)

But there is no way of constructing the date. It must be in yyyy/mm/dd format. You can't use 4ST as that only hold the day of the week not the data and using D(=100CV) will result in the time being in seconds since the base date.

Why don't you simply trigger the slave to sample on a digital signal and just ignore the time stamp of the slave?

Cheers,
Roger

Good morning James, If you change the time then yes it can affect a date change if the time is set near midnight. i.e. If the time / date has just rolled over to the next day and you set the time back to just before midnight then the date will roll over again when the time reaches midnight again. You are quite correct the DT time date set format need the [] to work. the [] tells the dataTaker the time and date format is ISO. (Tip: Use \091 and \093 to put them in the string) But there is no way of constructing the date. It must be in yyyy/mm/dd format. You can't use 4ST as that only hold the day of the week not the data and using D(=100CV) will result in the time being in seconds since the base date. Why don't you simply trigger the slave to sample on a digital signal and just ignore the time stamp of the slave? Cheers, Roger
50
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft