Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 69.0.0.0
Parameters
- 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: ICogAcqFifoThe new slave FIFO.
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | Fires when a slave is created for this FIFO. The following state flag may be affected:
|
| Exception | Condition |
|---|---|
| ArgumentException | FifoType is not in CogAcqFifoPixelFormatConstants. |
| CogAcqBadVideoFormatException | The video format is not recognized. |
| CogAcqNotAllowedForSlaveException | This FIFO is already a slave FIFO. |
| CogAcqCannotSlaveException | This FIFO cannot have a slave FIFO because of incompatible video formats or because there are no available camera ports for slave FIFOs. |
Creates a new slave acquisition FIFO for simultaneous acquisition with the FIFO associated with this object. The camera port of the slave FIFO is chosen to be compatible with the master FIFO.
For the Cognex MVS-8120/CVM1 the camera port of the first slave FIFO must be one higher that the camera port of the master FIFO. For example, if the master FIFO uses camera port 2, the first slave FIFO will use camera port 3, the second will use camera port 0, and the third will use camera port 1. It is not an error for two FIFOs to share the same camera port, but you may get unexpected behavior. If CreateSlaveAcqFifo(Boolean) cannot find a suitable camera port, it returns an error.
using Cognex.VisionPro; private CogFrameGrabbers myFrameGrabbers; private ICogFrameGrabber myFrameGrabber; private ICogAcqFifo myAcqFifo; private void InitializeFifo() { const string VIDEO_FORMAT = "Sony XC75 640x480"; ICogAcqSimultaneous simParams; myFrameGrabbers = new CogFrameGrabbers(); myFrameGrabber = myFrameGrabbers[0]; myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, Cognex.VisionPro.CogAcqFifoPixelFormatConstants.Format8Grey, 0, false); simParams = myAcqFifo.OwnedSimultaneousParams; if (simParams != null) { ICogAcqFifo slaveFIFO; slaveFIFO = simParams.CreateSlaveAcqFifo(True); } }
Imports Cognex.VisionPro
Private myFrameGrabbers As CogFrameGrabbers
Private myFrameGrabber As Cognex.VisionPro.ICogFrameGrabber
Private myAcqFifo As Cognex.VisionPro.ICogAcqFifo
Private Sub InitializeFifo()
Const VIDEO_FORMAT = "Sony XC75 640x480"
Dim simParams As Cognex.VisionPro.ICogAcqSimultaneous
myFrameGrabbers = New CogFrameGrabbers
myFrameGrabber = myFrameGrabbers.Item(0)
myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, CogAcqFifoPixelFormatConstants.Format8Grey, 0, False)
simParams = myAcqFifo.OwnedSimultaneousParams
If Not simParams Is Nothing Then
Dim slaveFIFO As Cognex.VisionPro.ICogAcqFifo
slaveFIFO = simParams.CreateSlaveAcqFifo(True)
End If
End Sub