Support Forums
Setting DT80 time via GPS

I'm trying to set the internal clock of the DT80 via a GPS using the code found here http://www.datataker.com/show.aspx?page=/ContentAUS/Manufacturing-Processing/Industrial-Loggers/DataTaker/DataTaker-FAQ/Program-Code/DT80-Range-Code.html: Updating DT80 range time from GPS, so far when ever i run the code i receive the error "DT80> dataTaker 80 E89 - Serial sensor receive timeout at control string position 13" Any thoughts on whats going wrong?

Dukes

I'm trying to set the internal clock of the DT80 via a GPS using the code found here http://www.datataker.com/show.aspx?page=/ContentAUS/Manufacturing-Processing/Industrial-Loggers/DataTaker/DataTaker-FAQ/Program-Code/DT80-Range-Code.html: **Updating DT80 range time from GPS**, so far when ever i run the code i receive the error "DT80> dataTaker 80 E89 - Serial sensor receive timeout at control string position 13" Any thoughts on whats going wrong? Dukes

Good morning Dukes,

If DT80 isn't getting a response from the GPS, you will need to check:

  • Is the GPS baudrate setting match to DT80?
  • Is the GPS wired correctly? Check your Rx and Tx lines.
  • Is the GPS powered?
  • Is your GPS set to output the GPGGA string?

Cheers,
Roger

Good morning Dukes, If DT80 isn't getting a response from the GPS, you will need to check: - Is the GPS baudrate setting match to DT80? - Is the GPS wired correctly? Check your Rx and Tx lines. - Is the GPS powered? - Is your GPS set to output the GPGGA string? Cheers, Roger

Hello,

I've checked the Baud and made sure the Baud rates match. The GPS has power and outputting the GPGGA string.

Dukes

Hello, I've checked the Baud and made sure the Baud rates match. The GPS has power and outputting the GPGGA string. Dukes

The Rx and Tx pins needed to be switched, I've purchased a null modem adapter but that didn't seem to fix the problem it still times out at control string position 13.

The Rx and Tx pins needed to be switched, I've purchased a null modem adapter but that didn't seem to fix the problem it still times out at control string position 13.

Good morning Dukes,

Check your GPS outputs of GPGGA string, then you will need to look at your parsing string and make sure it matches the GPS output.

It might help if you turn on the serial sensor debug P56=1

Cheers,
Roger

Good morning Dukes, Check your GPS outputs of GPGGA string, then you will need to look at your parsing string and make sure it matches the GPS output. It might help if you turn on the serial sensor debug P56=1 Cheers, Roger

Good Morning Roger,

After running the P56=1 command i received in addition to the usual error these lines:

DT80> 1SERIAL: RxBuf=0[]
1SERIAL: InputAction: "\e"
1SERIAL: InputAction: "\m[$GPGGA]"
dataTaker 80 E89 - Serial sensor receive timeout at control string position 13

Not exactly sure what it means.

Dukes

Good Morning Roger, After running the P56=1 command i received in addition to the usual error these lines: ```` DT80> 1SERIAL: RxBuf=0[] 1SERIAL: InputAction: "\e" 1SERIAL: InputAction: "\m[$GPGGA]" dataTaker 80 E89 - Serial sensor receive timeout at control string position 13 ```` Not exactly sure what it means. Dukes

Ok, I'm now able to get the hours minutes and seconds to populate the CV variables in the code. The last step that doesn't seam to be working here is actually updating the clock in DT80.

It seems that the minutes and seconds are working but the hours are off. Adjusting the variable that contains the time zone doesn't seem to do anything either, any suggestions?

BEGIN"GPSTime"

Profile SerSen_Port Function=Serial
Profile SerSen_Port Mode=RS232
Profile SerSen_Port BPS=4800
Profile SerSen_Port Flow=HARDWARE

5CV(W)=-4
6CV(W)=5CV*3600

RA"Report"("B:",ALARMS:OV:100KB,DATA:OV:1MB)10S
1..4cv(w)=0

2SERIAL(RS232,"\e\m[$GPGGA],%2d[1CV]%2d[2CV]%2d[3CV],%*f,%*1s,%*f,%*1s,%f[4cv]",1,W)

1CV("Hours")
2CV("Minutes")
3CV("Seconds")
4CV("Valid signal")
7CV("Second since midnight")=1CV*3600+2CV*60+3CV+6CV

Alarm(3ST><8,9)And
Alarm(&"Valid signal"==1)"Time updated"{P39=0 T=7CV P39=0}

END
Ok, I&#039;m now able to get the hours minutes and seconds to populate the CV variables in the code. The last step that doesn&#039;t seam to be working here is actually updating the clock in DT80. It seems that the minutes and seconds are working but the hours are off. Adjusting the variable that contains the time zone doesn&#039;t seem to do anything either, any suggestions? ```` BEGIN&quot;GPSTime&quot; Profile SerSen_Port Function=Serial Profile SerSen_Port Mode=RS232 Profile SerSen_Port BPS=4800 Profile SerSen_Port Flow=HARDWARE 5CV(W)=-4 6CV(W)=5CV*3600 RA&quot;Report&quot;(&quot;B:&quot;,ALARMS:OV:100KB,DATA:OV:1MB)10S 1..4cv(w)=0 2SERIAL(RS232,&quot;\e\m[$GPGGA],%2d[1CV]%2d[2CV]%2d[3CV],%*f,%*1s,%*f,%*1s,%f[4cv]&quot;,1,W) 1CV(&quot;Hours&quot;) 2CV(&quot;Minutes&quot;) 3CV(&quot;Seconds&quot;) 4CV(&quot;Valid signal&quot;) 7CV(&quot;Second since midnight&quot;)=1CV*3600+2CV*60+3CV+6CV Alarm(3ST&gt;&lt;8,9)And Alarm(&amp;&quot;Valid signal&quot;==1)&quot;Time updated&quot;{P39=0 T=7CV P39=0} END ````

Good morning Dukes,

I tested your code here and it works as expected:

t
Time 08:22:58.181

DT80> 1CV("Hours")=10
Hours 10.0

DT80> 2CV("Minutes")=20
Minutes 20.0

DT80> 3CV("Seconds")=30
Seconds 30.0

DT80> 5CV(W)=-4
DT80> 6CV(W)=5CV*3600
DT80> 7CV("Second since midnight")=1CV*3600+2CV*60+3CV+6CV
Second since midnight 22830.0

DT80> t=7CV
Time 06:20:30.000

So the time changed as per calculates. Please check the firmware version and check if you are using channel variables 1,2,3,5,6 and 7 any where else in the code and being set to an unexpected value.

Cheers,
Roger

Good morning Dukes, I tested your code here and it works as expected: ```` t Time 08:22:58.181 DT80&gt; 1CV(&quot;Hours&quot;)=10 Hours 10.0 DT80&gt; 2CV(&quot;Minutes&quot;)=20 Minutes 20.0 DT80&gt; 3CV(&quot;Seconds&quot;)=30 Seconds 30.0 DT80&gt; 5CV(W)=-4 DT80&gt; 6CV(W)=5CV*3600 DT80&gt; 7CV(&quot;Second since midnight&quot;)=1CV*3600+2CV*60+3CV+6CV Second since midnight 22830.0 DT80&gt; t=7CV Time 06:20:30.000 ```` So the time changed as per calculates. Please check the firmware version and check if you are using channel variables 1,2,3,5,6 and 7 any where else in the code and being set to an unexpected value. Cheers, Roger

Hello,

My alarm just need to be changed so that it updated outside of 9:00.

Thanks for the help

Hello, My alarm just need to be changed so that it updated outside of 9:00. Thanks for the help
186
8
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