National Instruments NI-IMAQdx Automobile Accessories User Manual


 
Chapter 2 Basic Acquisition with NI-IMAQdx
© National Instruments Corporation 2-7 NI-IMAQdx User Manual
Buffer Number Mode
Specify one of the following options for the buffer number mode.
Buffer Number—Gets the exact buffer number specified in the Buffer
Number parameter.
Last—Gets the most recently acquired buffer.
Next—Gets the next incoming buffer.
Buffer Number
A buffer number is a zero-based index that represents the cumulated
transferred image count. For example, during a continuous acquisition with
three internal buffers, the buffer number is updated as follows: 0, 1, 2, 3, 4,
5, and so on. Buffer numbers 0 and 3 refer to the same internal buffer in the
buffer ring.
For a one-shot acquisition, you can request only one of the available buffer
numbers. For a continuous acquisition, you can request any present or
future buffer number. You can also request the next logical buffer or the
buffer containing the most recently acquired data. With high-level grab
acquisitions, the buffer number defaults to the next transferred buffer.
When you complete the buffer acquisition step, the driver returns the actual
buffer number with the image.
Overwrite Mode
Ideally, a continuous acquisition acquires and processes every image that
is transferred from the camera. However, because of processing time
fluctuations, some images from the camera may not be processed before
the camera transfers the next image. Using multiple internal buffers in a
continuous acquisition allows for a small amount of jitter. However, if a
delay becomes too long, the camera overwrites the requested buffer with
new image data.
NI-IMAQdx is able to detect overwritten internal buffers. You can configure
the driver to manage an overwritten buffer in one of the following ways:
Get newest valid buffer
Get oldest valid buffer
Fail and return an error
In all cases, the camera continues to transfer data when a buffer is
overwritten.