NI-IMAQdx Function Reference



rval = IMAQdxGrab (IMAQdxSession id, Image *image, unsigned int waitForNextBuffer, unsigned int *actualBufferNumber);


Acquires the most current frame into image. Call this function only after calling IMAQdxConfigureGrab. If the image type does not match the video format of the camera, this function changes the image type to a suitable format.


Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
image Image * The image that receives the captured pixel data.
waitForNextBuffer unsigned int If the waitForNextBuffer value is true, the driver will wait for the next available buffer. If the waitForNextBuffer value is false, the driver will not wait for the next available buffer, and will instead return the last acquired buffer.
actualBufferNumber unsigned int (passed by reference) On return, the actual cumulative buffer number of the image retrieved.

Return Value

On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString.