Campbell Scientific GPS16-HVS Garmin GPS Receiver User Manual

Page 22

Advertising
background image

Appendix A. CR23X/CR10X Programs

If the Garmin16-HVS data is not correct every program table execution but

correct sometimes, check the P15 time-out. It may need a longer time-out.

Also check the P15 maximum number of characters to receive, usually 100 is

enough. Check the P15 termination character; it should be set to 42 (*). The

termination character should also work if set to 13 or 10. Also check the

buffering and filter. Buffering should be turned off. On a CR23X, index

parameter 2. The CR10X does not buffer data.

For P15 to properly read the $GPGGA string, P15 must be executing while the

$GPGGA string starts and finishes. The P15 time-out needs to be long enough

to pick up the string. The string is output once a second. If P15 starts to

execute while the Garmin16-HVS is sending the string, P15 must wait until the

string is sent again plus the amount of time it takes to send the string. It

shouldn’t need more than 1.5 seconds. P15 time-out is in units of 0.01

seconds, 100 = 1 second. A longer time-out will force the datalogger to wait

until the time-out has expired or the termination character is received or the

maximum number of characters are received. If the data in input locations

seem to move from the proper input location to another input location, P15 is

stopping before the entire string has been read. An example is latitude being

displayed in the time field, then in the latitude field. P15 works best when P15

quits reading data because the termination character has been read. Using the

PPS to trigger subroutine 98 is the best way to start P15 just before the

Garmin16-HVS sends the $GPGGA string. If the PPS signal pulls C8 high

while the datalogger is in the middle of executing an instruction, it may not be

able to run subroutine 98 before the $GPGGA string has started, which will

cause the datalogger to miss the data string. Turning on the data buffering

(CR23X only) may remedy the problem. Lengthening the serial time-out to

allow P15 to execute for 2 cycles of NMEA output may help. Otherwise the

SDM-SIO4 may be required or the datalogger program will need to be

simplified.

The datalogger will not pick up valid data until the Garmin16-HVS has a valid

GPS fix, except during a Garmin16-HVS warm start where time can be read

before position is known. Don’t spend a lot of time trouble shooting a

phantom problem just because the GPS receiver does not have a valid GPS fix.

A-8

Advertising