From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Extract buffer hangs in continuous acquisition with PCIe 1429

Solved!
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  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.

 

0 Kudos
Message 1 of 16
(4,897 Views)

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

0 Kudos
Message 2 of 16
(4,890 Views)

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

0 Kudos
Message 3 of 16
(4,872 Views)

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

0 Kudos
Message 4 of 16
(4,857 Views)

Hello,

 

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

 

-Zach

0 Kudos
Message 5 of 16
(4,818 Views)

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

0 Kudos
Message 6 of 16
(4,807 Views)

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

0 Kudos
Message 7 of 16
(4,806 Views)

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

Vinod

0 Kudos
Message 8 of 16
(4,791 Views)
Solution
Accepted by topic author Vinodk

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

Message 9 of 16
(4,788 Views)

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

0 Kudos
Message 10 of 16
(4,778 Views)