Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

"Buffer Number In"

The help documentation for IMAQ1394 Get Image and IMAQ1394 Get Image data (for IMAQ 2.0.2) both describe the Buffer Number In parameter as follows:
 
"Buffer Number In is the cumulative image number to get.  A value of -1 gets the most recently acquired buffer.  A value of -2 gets the last acquired buffer."
 
Huh?  What's the difference between "most recently acquired" and "last acquired"?  These terms seem synonymous to me.
If I've allocated 5 buffers for continuous acquisition (A, B, C, D, and E) and the acquisition process has wrapped the buffers once and is currently acquiring buffer 7 (corresponding to buffer location C), which buffer will be returned if I call Get Image with -1 for Buffer Number In?  And for -2?
Message 1 of 3
(2,993 Views)
Hi ceger -

This confusion has been mentioned before, and we're working on a better way to word that documentation for future releases of the driver.

A value of  -1 means that the function will wait for the current buffer being acquired to finish and then return that.   A value of -2 to means that it will simply return the the last entire buffer that has already been acquired into memory.

So if you have this function in a loop and give it -1 for the buffer number, the loop will iterate at the rate at which frames are coming in, and each frame will be a new image. If you have -2 for the buffer number, the loop will iterate as fast as it can, and it will get the same image until the next one has been fully acquired.


David Staab, CLA
Staff Systems Engineer
National Instruments
Message 2 of 3
(2,975 Views)
Thanks!
0 Kudos
Message 3 of 3
(2,969 Views)