Hello,
When I ran your code, images were acquired on the triggers until the timeout, and then after several triggers, the acquisition resumed. Looking at your code, there are several possible sources of trouble. In general, it is best to not use IMAQ Create or IMAQ Init inside of a loop. That will add significant delay to your system, as it can waste system resources. Each IMAQ Create creates a new buffer for acquisition. This could amount to a memory leak. Every buffer should be disposed of after it is used. You can do this using IMAQ Dispose.
I would suggest implementing some error handling into this program. That is, I would use the simple error handler to determine if an error has occurred. Also, use the Unbundle by Name function to stop the while lo
op to stop execution of your program. If you want to keep the program running in the event of a timeout, you can set it up to stop in all cases except for a timeout error.
Try those steps and let me know if the problem persists or if you have any additional questions.
Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments