MATLAB: Am I unable to set the InputBufferSize of the TCPIP/UDP/​Serial/VIS​A/GPIB object using the Instrument Control Toolbox

bufferhugeictincreaseinstrumentInstrument Control Toolboxlargem-codememoryobjectobjectssize;

I am trying to set the input buffer size using the following MATLAB code
t=tcpip('jarvitlinux',7);
t.InputBufferSize=128000000;
This results in the following error message: ERROR: ??? Error using ==> instrument.subsasgn at 155 There is not enough memory to create the input buffer. Try specifying a smaller value for InputBufferSize.

Best Answer

The memory available for a TCPIP/UDP/Serial/VISA/GPIB object's InputBufferSize is dependent on the heap space available for the Java Virtual Machine (JVM).
Larger buffer sizes can be specified after increasing the available heap space for the JVM from MATLAB Preferences > General > Java Heap Memory.
Maximum allowed InputBufferSize is 2 GB (as of MATLAB R2017a).