09-18-2016 05:13 AM
Hi,
I am working on a project with 3 cameras on a rotary table. 2 of them is at the same station and are triggered with one sensor. And the third one is at another station, triggered with the second sensor.
The problem is, we can not control the part flow into this table at a constant rate. This causes synchronization problems of acquiring images and knowing which image belongs to which product. In order to prevent that, we need a programming pattern which is able to store images, and after that process the images based on their frame number, so we can know images belong same product. Although I have not used buffering before, I think this design can be implemented with the aid of queues in Labview.
I could not find a way to do this in VBAI. I would like to get images from different cameras and then recall these images according to their frame numbers and process. Any suggestion would be appreciated.
Solved! Go to Solution.
09-18-2016 10:02 PM
09-19-2016 01:53 AM
Thank you for your response Brad. But I need someway to get images based on their frame numbers. In the scenario with every image, there is the possibility of missing an image from the second station while trying to get image from the first station because "every image" will always get the next image. We must store every image triggered whether or not the inspection is running and then get the oldest image acquired (not the next image) when we run acquire image step.
Is it possible to store images on camera itself, and get the very first image it has acquired when I run the Acquire Image step?
09-19-2016 08:19 AM - last edited on 11-15-2024 01:39 PM by Content Cleaner
That is what Every Image is for. Once the inspection has loaded and you acquire and process the first image from camera A, when you get to the acquire step for camera B, even if camera B has returned 3 images, the step will return the first one. The other images are buffered by the driver and the second image is returned on the next call, even newer images have been acquired.
Try it out and let me know if you have more questions.
Thanks,
Brad
09-20-2016 02:57 AM
When you have first suggested, I have checked it with 3 buffers and thought that it is not working as it should be. But after working a little bit, I figured out that it is getting the last image if the acquired images are more than the half of the buffer number. Now the problem is solved, thank you for your help.
09-20-2016 08:47 AM
I believe the IMAQdx driver reserves half the buffers for internal buffering so users only have access to acquiring half of the allocated buffers. So if you allocate 10 buffers, and you fall behind by more than 5, you won't be able to get the older buffers you need to avoid missing images. Hopefully you won't need more than 5 buffers of older images since 10 is the default max number of buffers you can allocate. Let me know if this isn't enough for you.
Thanks,
Brad
09-21-2016 02:25 AM
5 frames will be enough for my case. But for future reference, is there a way to increase that default max number or is it the absolute maximum?
09-21-2016 08:01 AM
You can add the following INI token to the Vision Builder.ini
[Settings]
MaxIMAQdxBuffers = 20
Hope that helps,
Brad