Jump to content

Clearing buffer?


boyracer38

Recommended Posts

Posted

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

Posted
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

Posted

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

  • 2 weeks later...
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.