Remove data from input buffer
After the input buffer is flushed, the BytesAvailable property is automatically configured to 0.
If flushinput is called during an asynchronous (nonblocking) read operation, the data currently stored in the input buffer is flushed and the read operation continues. You can read data asynchronously from the instrument using the readasync function.
The input buffer is automatically flushed when you connect an object to the instrument with the fopen function.