Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Finite acquisition with NI 1772 Smart Camera

I am running into memory issues while trying to implement a finite acquisition with NI 1772 Smart Camera. I need to acquire 500 frames at 100 frames per second (which is the critical part), and then transfer all the frames to the host computer for processing later on. I need to be able to start the acquisition from the computer.

 

I used the Vision Acquisition Express to configure the finite acquisition and then modified the VI so the camera wait for my signal. The problem is that it only work once. The second time I hit the "acquire" button on my VI in the host computer, the VI in the RT returns memory errors, like:

 

-1074396159 Not enough memory for requested operation.

or

-1074360299 Buffer list is already locked. Reconfigure acquisition and try again.

 

How can I free memory in the RT camera so it can send the new 500 frames requested? I already tried using IMAQ Dispose.vi, or only creating the array of images once and reusing, but without luck.

 

Regards;

Enrique

www.vartortech.com
0 Kudos
Message 1 of 5
(5,836 Views)

Hi Enrique. Thanks for posting your question on the forums.

 

Could you add a sample project where you add the Express VI and the communication functions you're using to send the data to the host? I also want to see exactly which configuration you're using in the Express VI.

 

I want to make sure it's not the communication part what's using up the memory.

 

Regards.

Aldo H
Ingenieria de Aplicaciones
0 Kudos
Message 2 of 5
(5,826 Views)

Hi Aldo. Thanks for responding. Attached is a project of what I am doing.

www.vartortech.com
0 Kudos
Message 3 of 5
(5,822 Views)

Hi Enrique.

 

I checked your code and I think the problem is that you're not releasing the 500 buffers after running. You should call the "IMAQ Dispose", and connect the Array of IMAQ images to it after you send the data. This should free up the memory and allow you to run more than once. Otherwise, every time you acquire, LabVIEW will try to create 500 new buffers while keeping the previous ones.

 

For low level examples of this, you can check the examples called "LL Ring" and "LL Sequence". You can find them in the example finder, Hardware Input and Output>>IMAQ>>Low Level.

 

Hope this helps.

Aldo H
Ingenieria de Aplicaciones
0 Kudos
Message 4 of 5
(5,772 Views)

Those examples Aldo pointed you to are the IMAQ examples, not the IMAQdx ones that you'd need for the 1772, but there are very similar ones for IMAQdx.

 

I think the main issue is that you are very close to the memory limit (512MB) of the camera when using 500 images. The way the driver internally works is that a sequence uses both an internal buffer for each image in addition to the output image that you get. This effectively doubles the memory requirement. My guess is that the second time through the memory is fragmented enough that the internal allocation fails.

 

I suggest using a modified Low-Level acquisition set to 500 frames, non-continuous. Then you have your inner loop wait for each image and transmit it. This would mean that only 500+1 temporary image buffers are needed. It would also be faster because you'd start your transmission before all 500 frames have been acquired (but since 500 internal buffers are used, you no matter how slow your transmission is, it will not block the image acquisition).


Eric

 

 

0 Kudos
Message 5 of 5
(5,769 Views)