User`s guide
Managing Memory Usage
6-39
mem_left = out.FrameMemoryLimit - out.FrameMemoryUsed;
To see an example of using a callback function to monitor memory usage, see “Monitoring
Memory Usage” on page 8-17.
Modifying the Frame Memory Limit
To enable your image acquisition application to work with more image frames, you might
want to increase the frame memory limit. Using the imaqmem function you can determine
the current frame memory limit and specify a new one. The following example illustrates
this process.
1
Determine the current frame memory limit — This example calls the imaqmem
function, requesting the value of the FrameMemoryLimit field.
out = imaqmem('FrameMemoryLimit')
out =
15425536
2
Set the frame memory limit to a new value — When you call imaqmem with a
numeric argument, it sets the FrameMemoryLimit field to the value.
imaqmem(36000000)
3
Verify the frame memory limit setting — Call imaqmem again, requesting the
value of the FrameMemoryLimit field.
out = imaqmem('FrameMemoryLimit')
out =
36000000