Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Check IMAQdx GetImagae.vi for a picture and then save it

Solved!
Go to solution

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.

0 Kudos
Message 1 of 2
(2,826 Views)
Solution
Accepted by ymartz

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.

 

imaqdx.png

 

Hopefully this assists with your application, please keep me informed with your progress.

 

Best Regards

 

Jamie S.

Applications Engineer
National Instruments
Message 2 of 2
(2,818 Views)