Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaq error - Operating system denied request to lock down memory

I am doing image acquisition with a line scan camera and a PCI-1426 acquisition board (LabView 7.1, Imaq 3.1.0 running on Windows XP Pro).
 
I need to do continuous acquisition at a high line rate for a few seconds. Since I can't save images on the hard disk fast enough, I allocate image buffers for all the acquisitions I need and after I save them to the hard disk.
 
But, although the computer had 2GB of RAM, I cannot setup more than 512MB of images buffer (for example, 10 buffers of 512 x 50000 pixels with 16 bits resolution = 512MB) without getting the following error message : Error-1074397139 - IMAQ Start.vi, Operating system denied request to lock down memory. If I use the task manager to see the available memory, I see that there is more than 1.2GB free in RAM. Note that this message appears only if I try to acquire more than 512MB (ex.: 11 buffers of 512 x 50000 pixels).
 
Is Imaq need to allocate all the buffers in a continuous memory range or there is a maximum memory range than it can allocate ?
Is it will help us to increase the RAM to 4GB or will we just have more useless memory ?
 
At this time, we have tried many things : increasing/decreasing the windows virtual memory, stopping all unused windows services and other applications. We also tried the boot.ini /3GB switch as described in the following link http://zone.ni.com/devzone/conceptd.nsf/webmain/b9a6c07c448c099586256fc60078328e even if it's recommended for the PCIe-1429 board. Nothing of that helped... and it is even worse !
 
If someone have an idea about how to use the available memory or an explanation of why I can't, it will be really appreciated.
Regards,
 
David St-Arneault
0 Kudos
Message 1 of 6
(4,777 Views)
David,
 
Try running the Windows Task Manager and then click on the Performance tab.  How much physical memory is being described as "available"?  Based on what you've described, it sounds like Windows will not allow LabVIEW to access so large a portion of the physical memory.  This may be due to how much memory is available or a limit within Windows that prohibits a single program from using such a large portion of memory.  Try reducing the size of the individual images and then try to allocate a larger number of buffers.  Each individual buffer is allocated within a continuous memory block.  Each of these blocks is limited to 64MB in size. 
 
Increasing your system memory should relieve the problem that you are seeing.  By doing this, you will then be using a smaller overall portion of the physical memory of your PC.  The IMAQ functions only write image data into physical memory, so increasing virtual memory won't help. 
 
Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,762 Views)
Hi Scott,
 
Thank you for your answer. As you said, I also think that Windows avoid LabView to use the available physical memory.  
 
With the task manager, I always see that more than 1GB of RAM is available for applications. I try many cases for images acquisitions and I was always limited to 512MB of images :
 
  1) 10 images of 50000 lines (10 x 512pixels x 50000pixels x 2bytes = 512MB)
  2) 20 images of 25000 lines (20x 512pixels x 25000pixels x 2bytes = 512MB)
  3) 50 images of 10000 lines (50 x 512pixels x 10000pixels x 2bytes = 512MB)
 
Trying to get one more images in all the cases causes the error.
 
But I am curious about why I get the error in the IMAQ Start.vi instead than in the Imaq Configure Buffers.vi ? Is the buffer size only determined while beginning acquisition ?
 
We will try some tricks next week to force Windows to let us use the memory with someone knowing Windows better than me. We will also try a memory utility to see if effectively memory is too split to allow a continuous block for the buffers... If we find something, I will post it here.
 
Regards,
 
David
0 Kudos
Message 3 of 6
(4,753 Views)
David,
 
The IMAQ Configure Buffer and IMAQ Create VIs are used to determine the parameters that are going to be loaded to hardware.  The IMAQ Configure Buffer and IMAQ Configure List VIs only specify how many buffers to allocate and the IMAQ Create VI specifies the image data type.  The IMAQ Start VI uses information from both of these VIs to allocate the actual memory for the acquisition.
 
Regards,
Scott R.
Applications Engineer
National Instruments
 
 
 
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 4 of 6
(4,730 Views)
I had the same problem with a PCI-1428 and a Basler 501k (1024*1480), 2GB of RAM installed (4 RAM sticks). My acquisition was limited to about 625 MB. in fact I could do the same acquisition with only 1GB installed... to solve the problem I updated to the latest (3.1.3) NI-IMAQ driver and I added IMG_ATTR_EXTENDED_MEMORY.vi in my code (thanks to DSA; you'll find that VI at http://zone.ni.com/devzone/conceptd.nsf/webmain/b9a6c07c448c099586256fc60078328e). That works! so the problem is apparently fixed. I've been able to acquire 25 sec at 50fps, using about 1.5 GB of RAM out of my total 2GB. note that the NI-IMAQ driver update alone did not fix the problem and I hope that NI will pay attention to fix that directly in the VISION VIsin the near future. I hope this will help others!
0 Kudos
Message 5 of 6
(4,677 Views)

Thank's to you Guibook !

I've tried all what's explained in the NI link above, but that doesn't solve my problem. But, I don't even think to use IMG_ATTR_EXTENDED_MEMORY.vi  without usign the windows /3G switch. While focusing too much to find a solution, I didn't see that the /3G part was optional ! It takes your message to wake me up...

Now, I'm also able to use many more memory ! Just using the IMAQ drive 3.1.3. and IMG_ATTR_EXTENDED_MEMORY.vi.

Regards,

David

 

 

0 Kudos
Message 6 of 6
(4,659 Views)