F
freeman.matt
So I'm writing an interface for my GPS unit and I've come up with a few
questions about how VB works. This is my first experience with a
'visual' programming language, and it's a little differient than the
console style I'm used to.
At this point, my interface works to a degree. It was built in VB .NET
2003 and it has a windows form on it with a button and a text field.
Whenever you hit the button, the form reads in the data from the GPS,
displays it in the appropriate blanks, and then writes that data to a
logfile. The form then does nothing until you hit the button again at
which point it updates the data and marks a new point in the log.
While this does accomplish my original objective (creation of a
logfile), I would like the data fields in the form to update themselves
in real time. The GPS spits out a data stream every second, and while
I do not need all that data logged, it would be useful to have a real
time readout of measurement accuracy. If I could begin to update the
data in the fields as soon as the application starts, then the button
would only need to be pressed when I want to create an entry in the
logfile.
In pseudo code, this is what I'm trying to do...
\\\
Start
Init Serial Port
Repeat
Read GPS Data
Update GPS Data in Form
If Button Pressed
Output data to logfile
Until Close
End
///
I'm a little confused as to how to do this in VB, so any pointers would
be very appreciated.
Thanks in advance.
-Matt
questions about how VB works. This is my first experience with a
'visual' programming language, and it's a little differient than the
console style I'm used to.
At this point, my interface works to a degree. It was built in VB .NET
2003 and it has a windows form on it with a button and a text field.
Whenever you hit the button, the form reads in the data from the GPS,
displays it in the appropriate blanks, and then writes that data to a
logfile. The form then does nothing until you hit the button again at
which point it updates the data and marks a new point in the log.
While this does accomplish my original objective (creation of a
logfile), I would like the data fields in the form to update themselves
in real time. The GPS spits out a data stream every second, and while
I do not need all that data logged, it would be useful to have a real
time readout of measurement accuracy. If I could begin to update the
data in the fields as soon as the application starts, then the button
would only need to be pressed when I want to create an entry in the
logfile.
In pseudo code, this is what I'm trying to do...
\\\
Start
Init Serial Port
Repeat
Read GPS Data
Update GPS Data in Form
If Button Pressed
Output data to logfile
Until Close
End
///
I'm a little confused as to how to do this in VB, so any pointers would
be very appreciated.
Thanks in advance.
-Matt