02-14-2014 07:26 PM
I'm using a PCIe-1429 with a custom camera. The camera can generate frames at arbitrary times. To capture images, I set a long timeout value, and then start a ring buffer with imgRingSetup (C program, Windows XP). If I want to stop the capture, I do:
imgSessionAbort(*Sid, NULL); imgClose(*Sid, TRUE); imgClose(*Iid, TRUE);
If no frames are arriving, this code hangs until a timeout has occurred. Ideally, I'd like an infinite timeout, and closing the session to happen immediately. The imgSessionAbort documentation claims that the acquisition will be stopped immediately, but this appears to be false. Are there any known solutions to this problem?
Thanks!
-Greg
02-14-2014 08:42 PM
02-14-2014 08:46 PM
02-14-2014 08:53 PM
The imgClose(*Iid, TRUE); is the call that blocks. I have tried using imgSessionStopAcquisition - then it is the call that blocks.
I agree that it's strange behavior - perhaps off the shelf cameras are always sending frames, but some cameras (astronomy, for instance) might only emit one frame an hour. I hope a good solution exists for this scenario. Alternatively, if nobody else sees this behavior, then I need to figure out what I'm doing differently/wrong. I have seen this same behavior across several different NI capture cards, OS's, and cameras.
02-14-2014 08:55 PM
02-14-2014 10:46 PM
I'll try Snap the next time I'm in the lab. I did try Grab and clicking again, and it also hung and waited for a timeout. If I set the timeout to something really long, I have to reboot the computer to start a new capture.
02-20-2014 11:20 PM
An update: after some experimentation, I've found that this problem only occurs in line scan mode. In area scan mode, the capture can be stopped and started at will, without waiting for a timeout to elapse.
02-20-2014 11:34 PM
Thanks, I'll pass this along to the Product Support Engineer that was going to replicate this setup.
Eric
07-16-2018 06:37 AM - edited 07-16-2018 06:38 AM
Dear Greg,
I experienced the same issue trying to call imgSessionAbort during a long acquisition. Did you manage to solve this problem somehow?
Thanks!
Laszlo
07-16-2018 12:11 PM
No, I've moved to using ethernet instead of CameraLink. I'm not sure if this bug was ever fixed.
-Greg