IMAQdxGrabCW

NI-IMAQdx Function Reference

IMAQdxGrabCW

Format

IMAQdxGrabCW(id As IMAQdxSession, image As CWIMAQImage, waitForNextBuffer As Long, actualBufferNumber As Long) As IMAQdxError

Purpose

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.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
image CWIMAQImage The image that receives the captured pixel data.
waitForNextBuffer Long 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 Long (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 IMAQdxGetErrorStringCW.