|
-
Jan 10th, 2001, 10:36 AM
#1
Thread Starter
Junior Member
I'm reading an Avtron foot counter from the serial port via MSComm. I'm doing it through a timer, so that I can continually read the port. My problem is that the counter sends a "canned" message. I only need the last value of the message. However, the timing is not always the same when the counter sends the data and when the VB timer is reading the port. Is there some way that I can either eliminate the timer and continually read the port or only accept the data from the port when the entire message is sent? I hope my question is clear. Please feel free to E-mail me if more clearification is necessary. [email protected] Thanks, Jeff
-
Jan 18th, 2001, 07:56 AM
#2
Lively Member
I messed around with MSCOMM once and I don't remember using a timer I just read in from the buffer and when the buffer reached a certain number of bytes I moved the data out of the buffer and malnipulated it.
I may be wrong but could you do something like that?
Simon
-
Jan 25th, 2001, 12:58 PM
#3
PowerPoster
Stockton is rite, you can set the InBufferCount properties to 1.
That mean when there is an incoming data being receive by the MSComm control,
it will fire the comEvReceive. Then you only going to read the data out from the InputBuffer.
Cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|