08-08-2012 06:57 AM
Hello , i am using a while loop to check if there is a picture available form a GIGE cam , the timeout for the triggered acquisition is set to the lower point and what i am doing is going around a while loop and saving an image IF it is available from the camera. My problem is that the vi that saves the actual image returns an error when there is no image available.
Is there a way to check for the availability of an image from the Getimage.vi and then use a case structure to save the image if it is available ?
I cannot extend the timeout since by doing so i will not be able to stop the loop when i want to !
I attach a sample code of my program ,
thanks in advance for your help,
yannis.
Solved! Go to Solution.
08-09-2012 03:51 AM
Hi Ymartz,
Thank you for your post and welcome to the forums.
One method for checking if a valid image is present at the output from the "IMAQdx Get Image" VI is to use a "ImageSize" Property Node, unbundle the data from that property node and monitor if the "x" and "y" sizes of the image are greater than Zero.
If both "x" and "y" are greater than Zero than a valid image is present and can be saved, otherwise pass the reference around the while loop. The VI snippet below illustrates the principle. If you have LabVIEW 2011 simply drag the image into your existing Block Diagram to use the code.
Hopefully this assists with your application, please keep me informed with your progress.
Best Regards