CogFrameGrabberImagingDevice CreateAcqFifo Method Cognex VisionPro 9.10
Create a new acquisition fifo on this frame grabber. The value of AutoPrepare will be used as the initial setting of the AutoPrepareEnabled property. If this value is true, the fifo will be prepared after it is created.

Namespace: Cognex.VisionPro.ImagingDevice.Implementation.Internal
Assembly: Cognex.VisionPro.ImagingDevice (in Cognex.VisionPro.ImagingDevice.dll) Version: 79.0.0.0
Syntax

public virtual ICogAcqFifo CreateAcqFifo(
	string videoFormat,
	CogAcqFifoPixelFormatConstants fifoType,
	int cameraPort,
	bool autoPrepare
)

Parameters

videoFormat
Type: System String

The video format. Must be one of the strings returned by AvailableVideoFormats

fifoType
Type: Cognex.VisionPro CogAcqFifoPixelFormatConstants

This parameter is ignored.

cameraPort
Type: System Int32

Specifies the camera port to use with the newly created acquisition FIFO. Camera port numbering starts at zero. Use GetNumCameraPorts(String). to determine how many camera ports this frame grabber supports.

autoPrepare
Type: System Boolean

Sets the AutoPrepareEnabled property of the acquisition FIFO that specifies whether the FIFO is automatically prepared when a property changes.

Return Value

Type: ICogAcqFifo

An CogAcqFifo suitable for acquiring images of the specified pixel format with the specified video format.

Implements

ICogFrameGrabber CreateAcqFifo(String, CogAcqFifoPixelFormatConstants, Int32, Boolean)
Exceptions

ExceptionCondition
ArgumentException

Format is not in CogAcqFifoPixelFormatConstants.

CogAcqBadVideoFormatException

The video format is not recognized, or no connected camera supports the video format.

CogAcqNoCamerasException

No cameras are connected (CogLink only).

CogAcqCannotCreateFifoException

autoPrepare is True and the FIFO cannot be prepared. This may be because a digital camera is not connected.

Remarks

Creates a new ICogAcqFifo on this frame grabber.

You can use AvailableVideoFormats to get a list of available video formats. They are also listed in the camera support table .

You may get an error creating an acquisition FIFO if the new FIFO and an existing FIFO use the same camera port. The error occurs when the existing FIFO uses hardware triggers. To avoid errors, you must either delete the old FIFO or create the new FIFO with autoPrepare set to False. The following code shows how to avoid this problem.

Note: The fifoType argument is ignored.

Dim iTrig As CogAcqTrigger Dim fgs As New CogFrameGrabbers Dim fg As CogFrameGrabber Dim myFifo As CogAcqFifo Set fg = fgs(0) Set myFifo = fg.CreateAcqFifo(fg.VideoFormats(0)) Set iTrig = myFifo iTrig.TriggerModel = cogAcqTriggerModelAuto iTrig.TriggerEnabled = True ... acquire images and process them ...Before changing video formats, flush the FIFO, then delete it myFifo.Flush myFifo = Nothing Set myFifo = fg.CreateAcqFifo(fg.VideoFormats(1)) Set iTrig = myFifo
See Also