Hello:

I am using the serial port to send & receive info.
When I send something I need to wait until something comes back (ONcomm event), or a timer timeout occurs (error-->no response), whichever happens first. Otherwise I wait in a while loop waiting for one or the other.

In order to respond to these events I think I must use a DoEvents....however this seems to open up to any event, whci causes bad things to happen.

Is there a way to limit the while loop to respond only to the Oncomm or timout (timer) event, rather than any event in the whole system? The main problem is that new things are getting sent out from various other timers & user clicks before the reception is complete.

Is it possible to wait for a reception or timer timeout, without using Doevents? Nothing else needs to happen during this lull in waiting.