imaq1394GetImage2CW

NI-IMAQ for IEEE 1394 Cameras Function

imaq1394GetImageCW

Format

imaq1394GetImageCW (sessionID As SESSION_ID, bufferNumberDesired As Long, bufferNumberActual As Long, onOverwrite As OverwritePolicy, dispatch As Object) As IMG_ERR

Purpose

Acquires the specified frame into Image. Call this function only after calling imaq1394ConfigureAcquisition. 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
sessionId SESSION_ID A valid Session ID, which you can obtain using imaq1394CameraOpen2.
bufferNumberDesired long The cumulative buffer number of the image to retrieve. For continuous acquisitions, set this parameter to IMG1394_LASTBUFFER to get the next buffer or set this parameter to IMG_IMMEDIATEBUFFER to get the current buffer.
bufferNumberActual long (passed by reference) The actual cumulative buffer number of the image retrieved.
onOverwrite OverwritePolicy The overwrite policy to follow if a buffer is overwritten during acquisition.
  • Specify the IMG1394_ONOVERWRITE_GET_OLDEST policy to get the oldest valid buffer instead of the overwritten buffer.
  • Specify the IMG1394_ONOVERWRITE_FAIL policy to return an error if the requested buffer is overwritten.
  • Specify the IMG1394_ONOVERWRITE_GET_NEWEST policy to get the most recent valid buffer instead of the overwritten buffer.
Note  The IMG1394_ONOVERWRITE_GET_NEXT_ITERATION policy is not implemented by NI-IMAQ for IEEE 1394 Cameras and is only presented to keep the API consistent with NI-IMAQ.
dispatch Object A valid CWIMAQImage.

Return Value

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