06-28-2013 05:25 PM
Hi, I'm using the NI 1427 with a Goodrich 640x512 NIR camera. We are using an external source to trigger the camera and occasionally the time between trigger pulses is longer than the timeout for the camera (i have it set to 2000 ms right now). I would rather not set a 10 sec timeout period for the camera and was wondering if there was some funciton I could call before calling the imaqGrab function to see if the camera has actually aqcuired an image and was ready to be "grabbed" from. Thanks!
Solved! Go to Solution.
07-01-2013 05:27 PM
Hi Feral,
How important is using an external trigger? If you wanted to base your triggering in software it would be fairly simple to use an event structure to only take a picture when a trigger actually occurs. That way you wouldn't need to bother increasing the timeout on the camera itself.
07-01-2013 05:53 PM
Thanks for the reply burrito, this is our setup: The computer system logs the time of an external event (this event is periodic and we only want to acquire a frame when this event occurs), it logs the time of the next event, finds the difference in the two times and calculates when the next event should happen. We then set up our time card to trigger the camera a few milliseconds before the next event.
We have the triggering working fine but if there are no external events we get no new triggers and the Grab timeouts and crashes the entire program. I was hoping there was an easy function call to check to see if there was a new image or some error handle that would avoid the entire program crashing if there is no new image to acquire. Thanks!
07-03-2013 09:45 AM
I don't believe there's a function for that; however, if you want to use error handling so that you don't have to deal with the error until you actually want to, make sure that you're using manual error handling and passing the error through the VI properly.
Here's a link on manual error handling.
07-04-2013 09:31 AM
@FeralPhys:
I think you can set the timeout period much higher. Actually, we have several projects where the timeout period is set to infinity.
The obvious question is, how do you stop the grab while it's stuck infinitely in the wait and you need to stop the application. You can do this by having a parallel execution loop, which in case of stop condition closes the IMAQ session. After IMAQ session is closed, IMAQ Grab stops with an error (which you can easily handle).
We are using this approach usually with IMAQdx, but I think it works with IMAQ the same way.
V
03-28-2014 09:04 AM
Hi Vladimir,
How do you set the timeout period to infinity? Thanks!
03-28-2014 09:08 AM
03-28-2014 09:57 AM
Great! Thank you. I was having trouble finding an "infinity" entry in the CamGen documentation, I was searching for a "-1" or "inf" entry and was coming up empty handed. This seems to fix our problem and ~50 days is close enough to infinity for us, Thanks again!
02-05-2016 10:57 AM
How do you do this in VBAI ?
02-08-2016 03:58 PM
Hi rex678805,
You should be able to configure the trigger settings for a framegrabber in the Acquire Image step. You should then see similar options in the Image Trigger tab. Here you should be able to set the tmeout for the acquisition.
Regards,