User Manual
11
'Use SetStatus prior to scan if baud rate needs to be changed for device
Scan (1,Sec,0,0)
GPS (latitude_a,Com4,LOCAL_TIME_OFFSET*3600,100,nmea_sentence(1))
NextScan
EndProg
5.3
Example Program Using Serial Instruction
Serial programming allows the retrieval of all values of GPRMC and GPGGA
values. The
GPS()
instruction is a subset of the values that are available.
'GPS16X-HVS at Campbell Scientific Factory Defaults
Const GPSPort = Com4 'Com port where GPS is connected
Public GGAstring As String * 500
Public RMCstring As String * 500
'rmc variables
Public rmcid As String
Public rmcutc As String
Public rmcstatus As String
Public rmclatitude As String
Public rmcin_s_ind As String
Public rmclongitude As String
Public rmce_w_indicator As String
Public rmcspeed As String
Public rmccourse As String
Public rmcutcdate As String
Public rmcmagvariation As String
Public rmcmage_w As String
Public rmcchecksum As String
'gga variables
Public ggaid As String
Public ggautc As String
Public ggailatitude As String
Public ggan_s_ind As String
Public ggalongitude As String
Public ggae_w_ind As String
Public ggapositionfix As String
Public gganumsatellites As String
Public ggahdop As String
Public ggaaltitude As String
Public ggaaltutudeunits As String
Public ggageoidsep As String
Public ggageoidunits As String
Public ggachecksum As String
Dim NBytesReturned As Long
Dim SubStrings(16) As String * 32, rawdata As String * 500
Dim CalculatedChecksum As Long, ReportedChecksum As Long
DataTable (gpsdata,True,-1)
DataInterval (0,1,Sec,10)
Sample (1,rmcid,String)
Sample (1,rmcutc,String)
Sample (1,rmcstatus,String)
Sample (1,rmclatitude,String)
Sample (1,rmcin_s_ind,String)
Sample (1,rmclongitude,String)
Sample (1,rmcspeed,String)
Содержание GPS16X-HVS
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 8: ......
Страница 28: ...Appendix A Changing GPS16X HVS Settings A 4 ...
Страница 38: ...Appendix B CR23X Wiring and Programming B 10 ...
Страница 41: ......