ICogAcqTrigger TriggerModel Property Cognex VisionPro 9.22 SR1
Reads or sets the trigger model.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.1.0.0
Syntax

CogAcqTriggerModelConstants TriggerModel { get; set; }

Property Value

Type: CogAcqTriggerModelConstants
Events

Event TypeReason
ICogChangedEvent Changed

Fires when the trigger model is changed.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentException

val is not in CogAcqTriggerModelConstants or is Slave.

CogAcqNotAllowedForSlaveException

The acquisition FIFO is a slave.

Remarks

Sets or gets the trigger model.

Changing the trigger model stops the current acquisition. Before changing the trigger model, use Flush  to flush any pending acquisition requests.

Examples

using Cognex.VisionPro;

private CogFrameGrabbers myFrameGrabbers;
private ICogFrameGrabber myFrameGrabber;
private ICogAcqFifo myAcqFifo;

private void InitializeFifo()
{
    const string VIDEO_FORMAT = "Sony XC75 640x480";
    ICogAcqTrigger triggerParams;

    myFrameGrabbers = new CogFrameGrabbers();
    myFrameGrabber = myFrameGrabbers[0];
    myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, 
        Cognex.VisionPro.CogAcqFifoPixelFormatConstants.Format8Grey, 0, false);

    triggerParams = myAcqFifo.OwnedTriggerParams;
    if (triggerParams != null) {
        triggerParams.TriggerEnabled = true;
        triggerParams.TriggerModel = CogAcqTriggerModelConstants.Semi;
        triggerParams.TriggerLowToHigh = 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 triggerParams As Cognex.VisionPro.ICogAcqTrigger

    myFrameGrabbers = New CogFrameGrabbers
    myFrameGrabber = myFrameGrabbers.Item(0)
    myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, CogAcqFifoPixelFormatConstants.Format8Grey, 0, False)

    triggerParams = myAcqFifo.OwnedTriggerParams

    If Not triggerParams Is Nothing Then
        triggerParams.TriggerEnabled = True
        triggerParams.TriggerModel = CogAcqTriggerModelConstants.Semi
        triggerParams.TriggerLowToHigh = True
    End If
End Sub
See Also