Troubleshooting, 1 gps setup and function, Gps setup and function – Campbell Scientific GPS16-HVS Garmin GPS Receiver User Manual

Page 13

Advertising
background image

Garmin 16-HVS GPS Receiver

' Store the ParseStrd elements of the $GPGGA string as
' short strings.
DataTable(Parsed,1,-1)
Datainterval (0,1,sec,10)
Sample(1,GPGGA,STRING)
Sample(1,TIME,STRING)
Sample(1,LAT,STRING)
Sample(1,HEMINS,STRING)
Sample(1,LONGI,STRING)
Sample(1,HEMIEW,STRING)
Sample(1,QUAL,STRING)
Sample(1,NUMSATS,STRING)
Sample(1,HDP,STRING)
Sample(1,ALTDE,STRING)
Sample(1,ALTUNIT,STRING)
Sample(1,GIODAL,STRING)
Sample(1,GEOUNIT,STRING)
Sample(1,AGE,STRING)
Sample(1,DIFFREF,STRING)
Sample(1,ASTERISK,STRING)
Sample(1,CHCKSUM,STRING)
Sample(1,CRLF,STRING)
endtable

' Store GPS $GPGGA string as a complete string
DataTable (GGA,1,-1)
DataInterval (0,1,Sec,10)
Sample (1, GPSData, string)
EndTable

'Main Program
BeginProg
SerialOpen (com1,1200,0,0,2000)
Scan (1,Sec,0,0)
bytes = SerialInChk (com1)
SerialIn (GPSData,com1,20,13,100)
splitstr (ParseStr(1),GPSData,chr(44),18,5)
Serialflush (com1)
CallTable GGA
CallTable Parsed
NextScan
SerialClose (com1)
EndProg

5. Troubleshooting

Testing and evaluation of serial communications is best done by reducing the

whole system to small manageable systems. Usually some portions of the

whole system are working. The first steps involve finding what is working.

During this process you may find parts of the system that are not working or

mistakes that can be easily corrected. Fix each subsystem before testing others.

5.1 GPS Setup and Function

Test the Garmin16-HVS for proper operation including the baud rate and

output string. Use a computer, terminal emulator software, a serial port

(RS232), and a 9-pin to 9-pin serial cable. The computer and serial port can be

the same as used to communicate with the datalogger. Terminal emulation

software is pretty common. Hyperterm is supplied as part of Windows ™ and

works. Procomm ™ is another communication software package that works

well.

7

Advertising