Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Combining snap and ring acquires in LabWindows?

Is there a recommended way to use the snap and ring functions together in one program?

Currently we are using the imaqSnap function to display an image and select an ROI. This ROI is used to acquire images with the various ring functions, exactly as described in the sample code.

The problem is that when we try to snap another image, the imaqSnap function crashes saying that there is a bad ROI (ROI passed was IMAQ_NO_RECT) or it returns NULL.

This is on a Windows 2000 system with LabWindows 5.5.1.
0 Kudos
Message 1 of 3
(3,006 Views)
The procedure you described for getting an ROI and using this ROI for subsequent acquisitions sounds just fine. You can use the snap and ring acquisitions in the same program, however you cannot call imaqSnap while another acquisition is running. You could stop the ring, call imaqSnap, then restart the ring, but this seems unnecessary since you can often just pull the latest buffer from the ring to use as your "snap".

Regards,

Brent R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,006 Views)
Thanks for the reply.

We are not running the snap function during the ring acquisition.

I've done a bit of debugging and found that if I close the session after the ring acquire and open a new session when I take another imaqSnap, it does not crash. Is this acceptable behaviour? It seems to work for us, but I did not find any documentation that mentions having to do this.
0 Kudos
Message 3 of 3
(3,006 Views)