How do I flush the serial port buffer? 
Author Message
 How do I flush the serial port buffer?

To initialise a piece of hardware I need to flush the serial port
buffer.

Any advice please?

Many thanks.



Sun, 03 Oct 2004 18:45:35 GMT  
 How do I flush the serial port buffer?
There is a "windows Flush com buffers.vi", hidden away in the
_sersup.llb. Usefull?


Sun, 03 Oct 2004 19:30:12 GMT  
 How do I flush the serial port buffer?
Do you need to flush the serial buffers on the PC or in the device
you're talking to? If you are wanting to flush the serial buffer on
your end, the buffers are automatically flushed when the port is
initialized. In addition, you can flush the receive buffer at anytime
by reading the number of bytes at the port and (if not zero) reading
that number of bytes.

If the serial buffer on the other machine needs flushing, that's a
pretty device-specific issue. What are you trying to talk to?

Mike...



Mon, 04 Oct 2004 00:54:40 GMT  
 How do I flush the serial port buffer?
Do you need to flush the serial buffers on the PC or in the device
you're talking to? If you are wanting to flush the serial buffer on
your end, the buffers are automatically flushed when the port is
initialized. In addition, you can flush the receive buffer at anytime
by reading the number of bytes at the port and (if not zero) reading
that number of bytes.

If the serial buffer on the other machine needs flushing, that's a
pretty device-specific issue. What are you trying to talk to?

Mike...



Mon, 04 Oct 2004 00:55:44 GMT  
 How do I flush the serial port buffer?

Quote:

> Do you need to flush the serial buffers on the PC or in the device
> you're talking to? If you are wanting to flush the serial buffer on
> your end, the buffers are automatically flushed when the port is
> initialized. In addition, you can flush the receive buffer at anytime
> by reading the number of bytes at the port and (if not zero) reading
> that number of bytes.

> If the serial buffer on the other machine needs flushing, that's a
> pretty device-specific issue. What are you trying to talk to?

> Mike...

Hi, I am using the parallel port to communicate. And I don't know if
it is the same with the serial port, but you can always try I
thought.....
If I use a VISA vi (e.g. write)in labview in need to flush the buffe
of the PC afterwards, because otherwise the old data stays in the
buffer, even if I write new data to the port. To flush the buffer can
be done with the vi: VISA flush serial buffer. (though it is for the
serial buffer, it also flushes the parallel buffer). But when I am
using the Out Port vi, I don't need to flush the buffer, because it
writes directly to the port, and every time you write new data it
overwrites the old data.
And very important! When I flush the buffer all the pins (all data,
control, status pins) are set to there "normal" state. And with the
Out Port they don't.

I hope you can use this information

Greetz,
JJ



Mon, 04 Oct 2004 14:41:16 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Serial port, flushes after write

2. NEWBIE: Serial Port Buffering / Timing

3. input buffer of serial port

4. serial port buffer receive overflow????

5. Empty serial port buffer?

6. serial-port traffic clogs buffers?

7. Flushing a file buffer in awk.

8. Optimising Browse Load with Buffering using STREAM and FLUSH

9. Flushing buffer to disk

10. Best word to flush output buffer

11. flushing printer buffer from clipper app

12. flush file?/buffer size is not allowed

 

 
Powered by phpBB® Forum Software