boyracer38 Posted January 5, 2005 Report Share Posted January 5, 2005 I'm sending data between two VI's on separate machines via serial read/write. Some times, the VI will read garbage data, sending it loopy. Is there any way of flushing the buffer, to clear it before sending data? Or is there a better way of dealing with this? I have to use serial comms as its part of a assignment for university. Thanks Jason Quote Link to comment
didierj Posted January 6, 2005 Report Share Posted January 6, 2005 Is there any way of flushing the buffer, to clear it before sending data? 3364[/snapback] Before you make any transmission read out the buffer. For this go to the palette Instrument I/O>Serial use the VISA Bytes at Serial Port and wire it to the byte count input of the VISA read. Didier Quote Link to comment
malef Posted January 6, 2005 Report Share Posted January 6, 2005 Dear list, in ...\LabVIEW...\vi.lib\instr\_sersup.llb you will find additional VIs for serial comm. With "windows Flush com buffers.vi" transmit and receive buffer can be cleared separately. It's a Windows specific VI. May be its the reason NI hides it from functions palette. Greetings Manfred Quote Link to comment
boyracer38 Posted January 6, 2005 Author Report Share Posted January 6, 2005 Manfred, Thanks. That exactly what i was after. Regards Jason Quote Link to comment
Kathryn62 Posted January 19, 2005 Report Share Posted January 19, 2005 Manfred, This also made a world of difference to my communications with a simple serial device. I had been monitoring with portmon which just said the instrument wasn't sending and flushing with VISA flush I/O buffer which was not sufficient. Many, many thanks, Kathryn Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.