IMAQdxGetImageCW

NI-IMAQdx Function Reference

IMAQdxGetImageCW

Format

IMAQdxGetImageCW (id As IMAQdxSession, image As CWIMAQImage, mode as IMAQdxBufferNumberMode, desiredBufferNumber As Long, actualBufferNumber As Long) As IMAQdxError

Purpose

Acquires the specified frame into image. If the image type does not match the video format of the camera, the function changes the image type to a suitable format.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain with the function IMAQdxOpenCamera.
image CWIMAQImage The image that receives the captured pixel data.
mode IMAQdxBufferNumberMode The buffer number mode of the image to retrieve. Set this parameter to IMAQdxBufferNumberModeNext to get the next buffer, or set this parameter to IMAQdxBufferNumberLast to get the last acquired buffer, or set this parameter IMAQdxBufferNumberModeBufferNumber to acquire a specific cumulative buffer number.
desiredBufferNumber Long The cumulative buffer number of the image to retrieve. This parameter is only needed if mode is set to IMAQdxBufferNumberModeBufferNumber.
actualBufferNumber Long (passed by reference) 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.