01-04-2012 12:07 PM - edited 01-04-2012 12:12 PM
Hey folks,
First and foremost, thanks for taking the time to take a peek and (hopefully!) help me out.
I have been using low level IMAQ vi's to do high speed acquisitions of a limited number of buffers from a cameralink camera (<~3000 buffers, stored on system memory, individually hardware triggered, 4x4 binning, 256 x 256 gray, @ 60fps) with a good deal of success for a little while now. Check out the examples/imaq/IMAQ Low Level.llb/LL Ring.vi - it is essentially the same thing, except I use a IMAQ Copy Acquired Buffer.vi followed by an IMAQ Get Buffer.vi instead of the two IMAQ Extract Buffer.vi's (though saying that may be a mistake when it comes to our slippery friend, LabVIEW). When I try to pump up the number of buffers, e.g. >5000, I start running into problems.
By highlighting the execution on the block diagram and using some indicators on the front panel, I have found that the process chugs along just fine until it gets to the IMAQ Start.vi, which, as you can see in the example, is right before and is responsible for beginning the acquisition. Instead of passing along the the acquisition, the process just hangs there. As I increase the number of buffers, IMAQ Start.vi takes longer and longer to pass to acquisition, taking minutes to pass between 3k-5k, if it does at all (I haven't waiting beyond 2 min). The system does not seem to be overloaded (as per the windows task manager, and there is still plenty of RAM unused) and I have been unable to find any answers elsewhere online.
Potentially relevant details:
01-04-2012 12:44 PM
I've attached a picture of the relevent segment of the program.
01-05-2012 02:27 PM
Anyone?
I'm happy to provide more details if need be...
01-05-2012 06:28 PM
Hello zobfish,
That is an interesting problem you are encountering. I would suggest to get your program to as simple as it can be and build from there. Is it only after you set the buffer to >5000 that this issue happens, and it works fine at <5000? What else is in the Sequence Structure of the IMAQ start VI? Are you sure that it is hanging on the start versus something else in that Sequence Structure? Also, you said the RAM is fine, but what about your computer's CPU usage?
Let me know about those points and we can see if we can get to the bottom of this.
Best Regards,
Nathan B
Applications Engineer
National Instruments
01-05-2012 07:08 PM
Nathan,
Thank you for helping me out (regardless of the outcome)!
I'll work on stripping it down to just the IMAQ components. In the meanwhile, answers to your questions that we can work from:
Lastly, thanks again for taking the time to look into this.
Cheers,
zobfish
P.S. The spell check deleted all the spaces in my post? I had to go back and put them all back in, yikes!
01-06-2012 12:35 PM
Update:
I checked the resource monitor and made a few notes:
Hope these clues will help!
Best,
zob
01-06-2012 12:59 PM
@zobfish wrote:
Update:
I checked the resource monitor and made a few notes:
- It favors the second core of the processor (of 4 total cores) almost exclusively. There is some activity on the first core while the buffers are loading, but ONLY the second core shows activity while the start vi is passing. I checked the core affinity of the LabVIEW process (via the task manager) and it is indeed set to use all four coures. Strange?
Hope these clues will help!
Best,
zob
Not really- The loop is not set up as a parallel loop so each interation will be processed in the same thread. You could try to run the loop parallized (depending on LV version its a recient feature).
01-06-2012 02:07 PM
Good point, Jeff - that makes sense. I'll check that out and see what we get.
01-06-2012 05:05 PM
I put a frame in the sequence structure before the frame with the start vi. I put the buffer for loop in there and parallelized it. I tried 2k - saw activity on all 4 cores, but not all that noticeable of a difference in time to buffer. Tried 3k and the computer bluescreened about halfway through the buffer list with a page_fault_in_nonpaged_area error and referenced niimaqk.sys. Yikes! Any idea what caused that?
01-11-2012 09:23 AM
My problem is still unresolved. Anyone have any new ideas?