AnsweredAssumed Answered

Read directories from HHD

Question asked by VRFuser on Jun 14, 1999
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 am currently testing a new e-mail client called Outlook.
If present, please disregard the "winmail.dat" attachment.
_______________________________________________________________________



From: Stan Bischof <rsb>
Date: Tue, 15 Jun 1999 10:03:11 -0700 (PDT)
To: rsb@sr.hp.com
Subject: Re[2]: HPVee and Serial

Stan Bischof <rsb@sr.hp.com> wrote:
> NANCY_MOREYRA@HP-Seattle-om1.om.hp.com 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.

regards

Stan Bischof
rsb@sr.hp.com


----------------------------------------------------------------------
Stan Bischof   Hewlett Packard Company   707-577-3994    rsb@sr.hp.com
----------------------------------------------------------------------

Outcomes