Why am I unable to set the InputBufferSize of my TCPIP/UDP/​Serial/VIS​A/GPIB object using the Instrument Control Toolbox?

33 views (last 30 days)
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Apr 2017
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).
  1 Comment
Vinod
Vinod on 12 Sep 2017
Add a delete(f) to your code after the fclose(f). The problem is you are likely drooling objects that are using up all of the heap space.

Sign in to comment.

More Answers (0)

Categories

Find more on Construct and Work with Object Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!