AnsweredAssumed Answered

Re2: HPVee and Serial

Question asked by VRFuser on Jun 15, 1999
Stan Bischof <> wrote:
> wrote:
> > Does anyone know of a fast and easy way to empty out the input buffer
> > of a serial port from HPVee 5.0. I am using an IRDA adapter to talk
> > to an instrument and before I initiate an IO transaction, I want to
> > make sure that the input buffer is empty of any unwanted junk.
> > Thanks,
> > Nancy M.
> I believe that an EXECUTE RESET transaction in a Direct I/O object
> should do the trick.

If EXECUTE RESET isn't sufficcient and you really want to make sure that
the input buffer is emptied, one way to do so is to write
a simple loop that empties the buffer.

An UNTIL BREAK pinging a Direct I/O with one transaction that reads a single
byte from the serial port. The DIO has an ERROR output added which
connects to a BREAK object.

These three objects can be placed in a User Function for easy reuse and
should serve to read in any existing data in the buffer.


Stan Bischof

Stan Bischof   Hewlett Packard Company   707-577-3994