05-06-2011 03:46 AM
I'm trying to acquire images from an AVT camera using hardware triggering. The trigger works fine in MAX but in a Visual Basic program I wrote using IMAQdx it locks up the screen until the hardware trigger is triggered and it is also not very consistent in grapping every image. Here's a snip of the code I'm using:
----------------------------------------------------------------
----------------------------------------------------------------
I have experimented with the timer1.interval loop and the camera timeout and still can't get it to work right.Also couldn't find any examples for grapping with a hardware trigger for Visual Basic so that would be helpfull too.
Thanks,
John
05-06-2011 05:03 PM
Hi John,
It looks like you are running that code from a timer callback. This runs in the UI thread. If you then do a blocking call (Grab) from the UI thread it blocks the UI from updating. Since I don't think VB6 (if that is what you are using) supports threads, one option would be to query the latest frame done first and only do a Grab if the frame has been acquired. I don't think the old VB6 interface supported events (the new VB .NET one does).
Eric