Machine Vision

Showing results for 
Search instead for 
Did you mean: 

IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

Go to solution

I acquire 500x500 pixel images at 1000 fps from a Basler A504k camera using a PCIe 1429 (LabView 8.6, x64 Vista). The images are processed online, and the whole thing works - some time. Once in a while the program just gets to the Extract Buffer vi and never gets out of it. No error is produced. I need to kill Labview and restart it to get going again. I read and implemented the suggested solution, but no luck. I monitor lost frames and and the buffer number requested, and can't find any problems there. My VI is attached. The images go to a queue, and another part of the program processes them. Any help will be very much appreciated.


0 Kudos
Message 1 of 16

Hi Vinodk,


Have you downloaded the latest Vision Acquisition version?


What version are you currently using?



0 Kudos
Message 2 of 16

Hi Eric

Thanks! Should have thought of that! Updated to the latest version (didn't check which version I was using before - it was last updated over a year ago), and so far no hangs with 2-3 hours of data taking. It was always an intermittant problem so I'm not sure it is solved yet.  Hope it is!

Thanks again!



0 Kudos
Message 3 of 16

No luck. The program behaves just the same with the latest acquisition sofftware.

0 Kudos
Message 4 of 16



Do you see and sort of indication of a memory issue or increased processor usage in Task Manager when this freezes?



0 Kudos
Message 5 of 16

Hi Zach

Thanks for the response.

CPU usage actually falls to near zero because there are no images to process when Extract Buffer freezes (image processing keeps it at near 100% when the program is working). I also don't see any increase in memory use.

It appears as if Extract Buffer is just waiting indefinitely for something to happen.


0 Kudos
Message 6 of 16



Can you put some debugging facilities into your code to record a list of buffer ids being requested and the ones returned when this happens?



0 Kudos
Message 7 of 16

Okay, I've done that. We'll be running the acqustion later today or tomorrow, and I'll post the file.


0 Kudos
Message 8 of 16
Accepted by topic author Vinodk
08-27-2015 04:09 PM

Thanks Vinod,


One other thing is that your program structure does look a bit broken. You are extracting buffers from the ring, putting a reference to the corresponding image into your queue, then going back and extracting a different buffer. This means that your previous buffer is no longer extracted and could be overwritten, but your other loop might not have finished processing that image yet.


Not that this should be causing your current problem, but I thought it is worth pointing out. I'd suggest having two queues of source images. One that contains free images and one that contains populated images. You producer loop that you gave here would consume from the free queue, grab into one of those images, then place it into the populated queue. Your consumer loop would pull from the populated queue, process the image, and then place the image back in the free queue.



Message 9 of 16

Hi Eric

I've attached the debug file. The first line describes the columns. I noticed that the frame count looks strange - the same frame number repeats once in a while. Doesn't that mean that the same image is being sent to the queue twice? 

I see your point about the possible problem with the buffer. Will try to implement the two queue solution tomorrow.


0 Kudos
Message 10 of 16