Parallax GPS time problem
bob12345
Posts: 5
Hi,
I'm having an issue with requesting the time, more specifically just the hour from a Parallax GPS module (the one with the board attached to the GPS receiver) to a BS2PX24. Its setup to smart mode so I request specific NMEA data as and when I need it using serin/out commands.
I've set up the program into multiple·slots and in Slot 0 (start of the program), I run this subroutine to·acquire the hour when the device is powered on:
get_power_on_time:
· SEROUT gps_sio, gps_baud, [noparse][[/noparse]"!GPS", GetHour]
· SERIN gps_sio, gps_baud, 3000, no_gps_response, [noparse][[/noparse]power_on_time_hour]
· RETURN
Using debug/lcd output·I can display the·hour variable (above)·no issue and store it in the variable "power_on_time_hour". However the problem then occurs when·I call a similar subroutine below, now·on the second page of the program located in Slot 1, which is part of a loop:
current_time:
· SEROUT gps_sio, gps_baud, [noparse][[/noparse]"!GPS", GetHour]
· SERIN gps_sio, gps_baud, 3000, no_gps_response, [noparse][[/noparse]current_time]
· RETURN
The debugger/LCD output reports that the "no_gps_response" has been called, ie its timed out and somehow failed to acquire the time (hour) for the second time.
The idea of the above is that "current_time" variable is checked for changes relative to "power_on_time_hour".
I have no idea why it keeps timing out each time I try to receive the time on the second occasion. I've noticed the following patterns, it works if I only call the GetHour Serout/Serin in command once in the program in any slots, the second time will ruin it. Same occurs if I have the output variables the same, ie both outputting to "power_on_time_hour" or "current_time". If I change the first or second occurance to say GetLatitude it gets the latitude fine, despite there also being other latitude calls elsewhere in the program - basically it seems to be a problem with this specific command to GetHour. All variables are defined on each page of every slot and i've can confirm that each slot is setup correctly as other parts work fine.
Has anyone seen this before/know how to solve it?
Many thanks as i've spent many hours banging my head against the wall trying to work out why its broken...
I'm having an issue with requesting the time, more specifically just the hour from a Parallax GPS module (the one with the board attached to the GPS receiver) to a BS2PX24. Its setup to smart mode so I request specific NMEA data as and when I need it using serin/out commands.
I've set up the program into multiple·slots and in Slot 0 (start of the program), I run this subroutine to·acquire the hour when the device is powered on:
get_power_on_time:
· SEROUT gps_sio, gps_baud, [noparse][[/noparse]"!GPS", GetHour]
· SERIN gps_sio, gps_baud, 3000, no_gps_response, [noparse][[/noparse]power_on_time_hour]
· RETURN
Using debug/lcd output·I can display the·hour variable (above)·no issue and store it in the variable "power_on_time_hour". However the problem then occurs when·I call a similar subroutine below, now·on the second page of the program located in Slot 1, which is part of a loop:
current_time:
· SEROUT gps_sio, gps_baud, [noparse][[/noparse]"!GPS", GetHour]
· SERIN gps_sio, gps_baud, 3000, no_gps_response, [noparse][[/noparse]current_time]
· RETURN
The debugger/LCD output reports that the "no_gps_response" has been called, ie its timed out and somehow failed to acquire the time (hour) for the second time.
The idea of the above is that "current_time" variable is checked for changes relative to "power_on_time_hour".
I have no idea why it keeps timing out each time I try to receive the time on the second occasion. I've noticed the following patterns, it works if I only call the GetHour Serout/Serin in command once in the program in any slots, the second time will ruin it. Same occurs if I have the output variables the same, ie both outputting to "power_on_time_hour" or "current_time". If I change the first or second occurance to say GetLatitude it gets the latitude fine, despite there also being other latitude calls elsewhere in the program - basically it seems to be a problem with this specific command to GetHour. All variables are defined on each page of every slot and i've can confirm that each slot is setup correctly as other parts work fine.
Has anyone seen this before/know how to solve it?
Many thanks as i've spent many hours banging my head against the wall trying to work out why its broken...
Comments
Declare a variable "Dummy VAR Byte" and do "SERIN gps_sio, gps_baud, 3000, no_gps_response,[noparse][[/noparse]power_on_time_hour, Dummy, Dummy]"