LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flushing a serial port - How to do??

I open a COM port on a cFP, then run VISA Flush IO Buffer.
I would now have thought that the buffer is empty - that is that there are now no more bytes at port and a read operation will not read anything.
I have read here somewhere that both the VISA open event and the Flush would empty the buffer.
 
This is not the case - there are lots of bytes at the port after the flush event - can anyone tell me how this is done correctly?
 
Thx!



Message Edited by Rodnebb on 02-06-2008 06:43 PM
Download All
0 Kudos
Message 1 of 4
(3,330 Views)
Have you set a mask value for the VISA Flush I/O Buffer? Use a mask of 144 to flush both the Receive and Transmit buffers.
0 Kudos
Message 2 of 4
(3,287 Views)
but.. why flush the transmit buffer - I don't transmit anything to this device, I'm only listening. I've tried both receive buffer flush methods.
0 Kudos
Message 3 of 4
(3,279 Views)
Well, if you've used the flush buffer correctly and more bytes keep arriving, they must be being continuously transmitted.
0 Kudos
Message 4 of 4
(3,256 Views)