Assembly: Cognex.VisionPro.GenTL (in Cognex.VisionPro.GenTL.dll) Version: 75.1.0.0
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: ICogAcqFifoAn CogAcqFifo suitable for acquiring images of the specified pixel format with the specified video format.
Implements
ICogFrameGrabber CreateAcqFifo(String, CogAcqFifoPixelFormatConstants, Int32, Boolean)| Exception | Condition |
|---|---|
| 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. |
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