Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

About Next and Last for the buffer Nuber Mode

During continuous image acquisition, for example, when I have four buffers: A, B, C, D

I realized that when I use the the "Next" mode, I always get a new image, but sometimes the buffer number increases more than 1, which means if I got image at 'A' during the last acquisition, somtimes I got image at 'C' in the current one.

When I use the 'Last' mode, sometimes I got the same image, the buffer number does not increases, which means I got image at 'A' during the last acquisition, and I again got image at 'A' in the current one.

Is there a way to do the continuous acquisition so that the program read in the 'Next' mode when there is no new image finished waiting in the buffer, and read in the 'Last' mode when there is already one or more than one image waiting in the buffer ?

What I mean is:

In the situation that I read image in buffer 'A' in the last call, when I try to read again, if there is already  new image waiting in buffer 'B', 'C' , and 'D' is not finished, the program  get the image in 'C',  on the otherhand, if 'B' is still not finished, the program wait until it is finished and get the image in buffer 'B'


Thanks

Cindy

0 Kudos
Message 1 of 3
(3,189 Views)
Hi Cindy
Through the property node of IMAQdx session, you can access the property "Last Buffer Number". Before each GetImage, read this property. If the number is equal to the buffer number you have already read, increase the number 1 and wait for the particular buffer number. If the last buffer number is higher than the buffer number you have read, call GetImage with the number itself - it will return immediately with the requested buffer.
Vladimir

View my profile on LinkedIn
0 Kudos
Message 2 of 3
(3,186 Views)
Thanks a lot
Cindy

0 Kudos
Message 3 of 3
(3,177 Views)