Jump to content

How does exactly work the "flush" function on the Serial port?

Recommended Posts

Hi everybody,

I'm working with the serial communication port and even though I'm flushing both the buffers (either the receiver and the transmitter) when I go to read the answer to the command I've already sent on the bus I also read the echo of the command. The flush functions are set before the reading procedure then I guessed this functions cleans both the buffers on the serial device but it doesn't do it. So, can anyone explain to me how exactly work the flush function on the serial port?

Thank you in advance.

Link to comment

Join the conversation

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

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.

  • Similar Content

    • By WILSTi

      I'm developing an application to play "Battleship" with another opponent through serial communication. I currently have the following difficulty:
       I have not been able to fill the Array with my opponent's ships, I can modify a position, but by changing the position, the result of the previous position returns to its original value.
      VI operation:

      For my turn, using the radio buttons, I select the coordinate and press the SEND button. My opponent answers me with a 1 if I hit or with a 0 if I failed, this data is what I couldn't keep in the array.
      Best regards,
    • By Benyamin.KH20
      hello all
      i going to connect to serial port with labview but not with VISA i want connect with DLL i wrote a program on labview but that have a probelm  this commg.dll is for connecting to serial port
      please see!

    • By Majo
      I need a little help. 
      I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on. 
      The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign.
      When I send the string via Visual Studio it works perfectly.
      Is there someone who can help me.
      I attached picture of vi and Arduino code
      Thank you very much.   

      Arduino code.txt
  • Create New...

Important Information

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