Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2003, 07:42 AM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to get data from GPS

we are trying to get data from some of the GPS device which is connected to serial port......so how can we do that in VB
code also

 
Old August 28th, 2003, 11:25 AM
Authorized User
 
Join Date: Jul 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's been a long time since I used this but here is a code for reading from COM port. There should be a decoding part in your GPS manual

Pavel

Private Sub Form_Load ()
  ' Buffer to hold input string
  Dim Instring As String
  ' Use COM1.
  MSComm1.CommPort = 1
  ' 9600 baud, no parity, 8 data, and 1 stop bit.
  MSComm1.Settings = "9600,N,8,1"
  ' Tell the control to read entire buffer when Input
  ' is used.
  MSComm1.InputLen = 0
  ' Open the port.
  MSComm1.PortOpen = True
  ' Send the attention command to the modem.
  MSComm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that
   ' the modem responds with "OK".
  ' Wait for data to come back to the serial port.
  Do
     DoEvents
  Buffer$ = Buffer$ & MSComm1.Input
  Loop Until InStr(Buffer$, "OK" & vbCRLF)
  ' Read the "OK" response data in the serial port.
  ' Close the serial port.
  MSComm1.PortOpen = False
End Sub


 
Old September 1st, 2004, 11:06 PM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to slezak
Default

Dear Pavel, one more question.
Can you help me with this problem?
I will write and read to serial port - COM1
Example:
I will send impulse to COM1, Pin2, time-long 1.5 second.

Issposible it in VB6.0,
haw is correct syntax?

Thanks Petr





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Plotting on a map by GPS? goreng C# 0 December 18th, 2006 09:13 AM
GPS, Plotting on a map goldablasha C# 0 October 20th, 2005 07:34 PM
Implementing GPS aravwind General .NET 5 November 3rd, 2004 09:43 PM
plz help me : working on GPS system shami Classic ASP Basics 0 July 17th, 2003 12:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.