![]() ![]() So I copied the code out of the function and tried again, still not working. My thinking was 'thats a bit odd, but got a get around' and I called the click routine from the read port function this did not work. I am reading the data using ReadExisting() but once it is read it appears to remain on the Port until cleared using the following in a seperate button click ComPort.DiscardInBuffer() ComPort.DiscardOutBuffer() rtbIncomingData.Text = ' ' If I manually click the button it clears the relavent buffers and rich textboxes and works. Hi All, I am having a bit of trouble with some serial port reading. Note, for some USB serial adapters, this may only flush the buffer of the OS and not all. Clear output buffer, aborting the current output and discarding all that is in the buffer. If the buffer becomes full, and another character arrives, nRTS will be set False, and any() will return the count N. Note that the any() method returns the number of bytes in the buffer. ![]() NRTS will go True when characters are read from the buffer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |