background image

Appendix A.  CR23X/CR10X Programs 

GPS fix.  A better approach is to overwrite the GPS quality location with zero 
before executing P15.  Use P30 to overwrite one input location. 

If the GPS time is used to set the datalogger clock, the GPS time must be 
parsed into three input locations: Hour, Minutes, Seconds.  P114 is used to set 
the datalogger clock to match values in input locations.  Some time will have 
passed between the GPS fix and when the program table reaches the P114 
instruction.  Adjustments can be made by adding a second or two.  Be careful 
about setting seconds to a number greater than 59.  You can also correct the 
UTC time to local time.  Table based dataloggers require year, day, hour, 
minute, and seconds to use P114.  Only hour, minutes, and seconds are 
available from the $GPGGA string.  The PGRFM string includes the month, 
day and year, but is difficult to use.  

A.1.5  Program Discussion 

Wiring when using RJ45 adapter: 

Function Color 

Datalogger 

Connection 

Power in 

Blue  

12 volts 

Power ground 

Orange 

Ground 

Power switch 

Black 

ground 

TXD Green 

C5 

PPS Yellow 

C8 

The Garmin16-HVS should be setup for 1200 baud, 8 data bits, 1 stop bit and 
no parity.  The GPGGA string should be output.  The 1 pulse per second signal 
should be output with a pulse duration of 80 milliseconds.  

The code required to read the GPS information and store it to final storage is in 
Subroutine 98.  Subroutine 98 is interrupt driven and triggered when a rising 
edge is detected on Control port 8.  The Garmin16-HVS has a 1 PPS signal 
which is wired to control port 8.  The transmit data line of serial port 1 on the 
Garmin16-HVS is wired to control port 5.  The Garmin16-HVS serial port 2 
generally is not used.  

When the 1 PPS signal triggers subroutine 98, P15 is executed.  P15 is setup to 
read ASCII serial data.  Each data point is separated by a non-numeric 
character or a decimal point.  Fifteen input locations are used as temporary 
storage for the $GPGGA string.  Table 3.1 explains the $GPGGA string. 

The input locations used for the $GPGGA string are: 

1) Raw_Time, Time in hours, minutes, and seconds  
2) LatDegMin, Latitude degrees and minutes  
3) Lat_Frac, Latitude fractions of minute  
4) LngDegMin, Longitude degrees and minutes  
5) Lng_Frac, Longitude fractions of minute  
6) Quality, GPS quality indicator  
7) NumSats, Number of satellites in use  
8) HDPWhole, Horizontal Dilution of Precision  
9) HDPFrac, Horizontal Dilution of Precision, tenths  
10) Elevation, Elevation in meters  
11) Geoidal, Geoidal separation in meters  
12) Geoidalth, Geoidal separation in meters, tenths  
13) Age, Age of differential GPS data  
14) Agetenth, Age of differential GPS data, tenths  
15) DiffID, Differential reference station ID  

A-4 

Summary of Contents for GPS 16-HVS

Page 1: ...Garmin 16 HVS GPS Receiver Revision 2 08 C o p y r i g h t 2 0 0 3 2 0 0 8 C a m p b e l l S c i e n t i f i c I n c...

Page 2: ...ther warranties expressed or implied including warranties of merchantability or fitness for a particular purpose CAMPBELL SCIENTIFIC INC is not liable for special indirect incidental or consequential...

Page 3: ...ush 5 4 1 4 SerialClose 6 4 2 Parsing and Data Storage Options 6 4 2 1 SplitStr 6 4 2 2 Converting Strings to Floating Point Numbers 6 5 Troubleshooting 8 5 1 GPS Setup and Function 8 A CR23X CR10X Pr...

Page 4: ...art Number 17218 3 Tables 2 1 Wiring the RJ45 Connector with Flying Leads 2 2 2 Wiring without the RJ45 Connector Garmin Wiring 3 2 3 RJ45 to DB9 RS 232 Adapter 3 3 1 NEMA GPGGA String Definition 4 A...

Page 5: ...ame housing with one cable for the power supply and communications The GPS antenna must have a clear view of the sky Generally the GPS antenna will not work indoors The Garmin16 HVS is a 12 channel GP...

Page 6: ...iring the RJ45 Connector with Flying Leads GPS Garmin16 HVS Datalogger Connection Function Blue 12 volts Power Orange Ground Power Ground Black Ground Remote on off Green Data in RS232 TX out of GPS Y...

Page 7: ...Blue Port 1 Data in RS232 or TTL levels OK 5 White Port 1 Data out RS232 Levels 6 Gray PPS 7 Green Port 2 Data in RS232 or TTL levels DGPS input 8 Violet Port 2 Data out RS232 reserved for future use...

Page 8: ...nn nnn Longitude Degrees minutes thousandths of minutes 5 b E East or W West 6 t GPS Quality Indicator 0 No GPS 1 GPS 2 DGPS 7 uu Number of Satellites in Use 8 v v Horizontal Dilution of Precision HDO...

Page 9: ...nging the GPS receiver setups including using higher baud rates which the CR1000 CR3000 CR800 and CR850 support 4 1 Read GPS Data 4 1 1 SerialOpen SerialOpen is used to open the appropriate serial por...

Page 10: ...n to parse the GPGGA string into an array of strings Declare an array of 18 strings of 15 characters Example ParseStr 18 as string 15 The SplitStr instruction uses the result string search string filt...

Page 11: ...MIEW 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 D...

Page 12: ...ial 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 sof...

Page 13: ...read must be considered Generally the execution interval can not be less than 2 seconds when the PPS signal is not used A 1 2 Reading GPS Data Table A 1 is a sample CR23X P15 instruction for reading...

Page 14: ...as been read P15 parameter 10 is the first input location you wish to store GPS data in Fifteen sequential input locations will be used to store time and position Example A 1 Program Instruction 15 P1...

Page 15: ...e parsed with the P15 instruction when decimal delimiter is on If P15 parameter 2 is 6x where the x selects the baud rate every non numeric value and decimal point will act as a delimiter The Degrees...

Page 16: ...put with a pulse duration of 80 milliseconds The code required to read the GPS information and store it to final storage is in Subroutine 98 Subroutine 98 is interrupt driven and triggered when a risi...

Page 17: ...bout unused subroutine not needed 1 If Flag Port P91 1 11 Do if Flag 1 is High 2 98 Call Subroutine 98 Table 2 Program 02 0 0000 Execution Interval seconds Table 3 Subroutines 1 Beginning of Subroutin...

Page 18: ...TM 2 0 45 F 3 18 Z Loc Orig_TM Move minutes and seconds right of decimal 7 Z X F P37 1 18 X Loc Orig_TM 2 0001 F 3 19 Z Loc Int1 Pluck off hours 8 Z INT X P45 1 19 X Loc Int1 2 20 Z Loc Hours Subtract...

Page 19: ...time stamp 17 Real Time P77 27570 1 0011 Hour Minute Seconds midnight 0000 Write GPS based time stamp 18 Sample P70 6080 1 3 Reps 2 20 Loc Hours Set resolution to high for latitude and Longitude 19 R...

Page 20: ...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 tim...

Page 21: ...d13 Age of differential GPS data GGA Field14 Differential reference station 2 SIO4 programming fltst 1 t GPGGA xFt Dt Dt b1t Dt Dt b1t Ft Ft Ft FX _ Const OneRep 1 Const NoValues 0 Const OneValue 1 Co...

Page 22: ...Sio4COMSetUpCmd Port2ComCode UnusedParameter NoValues U nityMultiplier NoOffset Delay 100 mSec Start GGA data filter on SDM Sio4 port SIO4 NotUsed OneRep Sio4Address0 Port2 StartRxFilter RxFilt9001 U...

Page 23: ...l Characteristics Input Voltage 6 0 Vdc to 40 Vdc unregulated Current 65 mA 12 Vdc GPS Receiver Sensitivity 165 dbW minimum GPS Performance Receiver WAAS Enabled 12 parallel channel GPS receiver conti...

Page 24: ...L GPGSA GPGSV GPRMC GPVTG Garmin proprietary sentences PGRMB PGRME PGRMF PGRMM PGRMT PGRMV NMEA 0183 Output Position velocity and time Receiver and satellite status Differential Reference Station ID a...

Page 25: ...output Data off DGPS Mode WAAS only Differential mode Automatic Earth Datum Index NGS 84 Selected Sentences GPGGA Common changes would be baud rate and selected sentences The CR1000 CR3000 CR800 CR850...

Page 26: ...effect on the next power cycle or an external reset event TABLE D 2 PGRMO Output Sentence Enable Disable PGRMO 1 2 hhCRLF 1 Target Sentence description e g GPVTG 2 Target Sentence Mode where 0 disabl...

Page 27: ...egardless of the baud rate the sentences are reference to the PPS signal immediately preceding the GPRMC sentence or whichever sentence is output first TABLE D 4 GPGGA Global Positioning System Fix Da...

Page 28: ...Appendix D Garmin16 HVS Setups D 4 This is a blank page...

Page 29: ...This is a blank page...

Page 30: ...L www campbellsci com br suporte campbellsci com br Campbell Scientific Canada Corp CSC 11564 149th Street NW Edmonton Alberta T5M 1W7 CANADA www campbellsci ca dataloggers campbellsci ca Campbell Sci...

Reviews: