NI Home > Community > NI Discussion Forums

Machine Vision

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Vinodk
Posts: 13
0 Kudos
Accepted Solution

IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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  http://forums.ni.com/t5/Machine-Vision/BUG-with-PCIe-1429-Cameralink-full-config-Basler-sprint-lines... 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.

 

Active Participant
BlueCheese
Posts: 1,214
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

Hi Vinodk,

 

Have you downloaded the latest Vision Acquisition version? http://joule.ni.com/nidu/cds/view/p/id/1641/lang/en

 

What version are you currently using?

 

Eric

Member
Vinodk
Posts: 13
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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!

Best,

Vinod

Member
Vinodk
Posts: 13
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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

Active Participant
iZACHdx
Posts: 327
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

Hello,

 

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

 

-Zach

Certified LabVIEW Developer

Member
Vinodk
Posts: 13
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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.

Vinod

Active Participant
BlueCheese
Posts: 1,214
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

Vinod,

 

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?

 

Eric

Member
Vinodk
Posts: 13
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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

Vinod

Active Participant
BlueCheese
Posts: 1,214

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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.

 

Eric

Member
Vinodk
Posts: 13
0 Kudos

Re: IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

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.

Vinod