Specify size of input buffer in bytes
InputBufferSize as the total
number of bytes that can be stored in the software input buffer during
a read operation.
A read operation is terminated if the amount of data stored
in the input buffer equals the
You can read text data with the
You can read binary data with the
You can configure
InputBufferSize only when
the instrument object is disconnected from the instrument. You disconnect
an object with the
A disconnected object has a
Status property value
If you configure
there is data in the input buffer, then that data is flushed.
Any instrument object
The default value is
This example shows how to set the input buffer size for a serial
port object. The
InputBufferSize property specifies
the total number of bytes that can be stored in the software input
buffer during a read operation. By default,
There could be a case when you would want to increase it to higher
than the default size.
Create a serial port object associated with the COM1 port. Set the input buffer size to 768 bytes.
s = serial('COM1'); s.InputBufferSize = 768;