ICogAcqExposure Exposure Property Cognex VisionPro
Reads or sets the exposure time in milliseconds. The special value of zero indicates to use the smallest supported time.

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

double Exposure { get; set; }

Property Value

Type: Double
Events

Event TypeReason
ICogChangedEvent Changed

Fires when the exposure changes.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentException

The exposure time is < MinExposure.

Remarks

Sets or gets the exposure time in milliseconds. The special value zero indicates to use the shortest time that the camera supports.

For strobed acquisitions, this value is the duration of the strobe pulse. To find the pulse duration of your strobe, see the strobe light’s specifications. Note that this function is used to let the acquisition software know the duration of the strobe pulse, not to set the duration of the strobe pulse.

To determine the exposure time for Cognex CDC cameras, see How to Choose a CDC Shutter Mode.

If you are using a FireWire (IEEE 1394DCAM) camera, the exposure value may be an absolute time in milliseconds or a a register value. Check with the documentation supplied with your camera to determine whether your camera supports absolute exposure times. In cases where the register value can be multiplied by a constant to obtain and absolute exposure, the camera's CCF provides the necessary information to use absolute values. In all other case, you must use the raw register value.

You can use the DCAM Doctor application included in your VisionPro distribution to learn about the properties of your FireWire camera.

Examples

using Cognex.VisionPro;

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

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

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

    exposureParams = myAcqFifo.OwnedExposureParams;
    if (exposureParams != null)
        exposureParams.Exposure = 0;
}
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 exposureParams As Cognex.VisionPro.ICogAcqExposure

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

    exposureParams = myAcqFifo.OwnedExposureParams

    If Not exposureParams Is Nothing Then
        exposureParams.Exposure = 0
    End If
End Sub
See Also