Click to See Complete Forum and Search --> : MSComm timing problem
Jeffrey Kolwicz
Jan 10th, 2001, 09:36 AM
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. jkolwicz@uss.com Thanks, Jeff
Stockton.S
Jan 18th, 2001, 06:56 AM
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
Chris
Jan 25th, 2001, 11:58 AM
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!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.