User`s manual
AW00098504000 Features
Basler ace Camera Link 203
Setting the Exposure Auto Function Using Basler pylon
Setting the exposure auto functionality using Basler pylon is a several step process:
Select the Auto Function AOI to which the Exposure Auto function is assigned.
Set the value of the Offset X, Offset Y, Width, and Height parameters for the AOI.
Set the value of the Auto Exposure Time Abs Lower Limit and Auto Exposure Time Abs Upper
Limit parameters.
Set the value of the Auto Target Value parameter.
Set the value of the Exposure Auto parameter for the "once" or the "continuous" mode of
operation.
You can set the exposure auto functionality from within your application software by using the pylon
API. The following code snippets illustrate using the API to set the exposure auto functionality:
// Select Auto Function AOI to which the Exposure Auto function is assigned
// For this example, assume that the Exposure Auto function is
// assigned to Auto AOI 1
Camera.AutoFunctionAOISelector.SetValue( AutoFunctionAOISelector_AOI1 );
// Set the position and size of selected auto function AOI. In this example, we set
// auto function AOI to cover the entire sensor.
Camera.AutoFunctionAOIOffsetX.SetValue( 0 );
Camera.AutoFunctionAOIOffsetY.SetValue( 0 );
Camera.AutoFunctionAOIWidth.SetValue( Camera.AutoFunctionAOIWidth.GetMax() );
Camera.AutoFunctionAOIHeight.SetValue( Camera.AutoFunctionAOIHeight.GetMax() );
// Set the exposure time limits for the exposure auto function
Camera.AutoExposureTimeAbsLowerLimit.SetValue( 1000 );
Camera.AutoExposureTimeAbsUpperLimit.SetValue( 1.0E6 );
// Set target gray value for the exposure auto function
// (If gain auto is enabled, this target is also used for gain auto control)
Camera.AutoTargetValue.SetValue( 32 );
// Set the mode of operation for the exposure auto function
Camera.ExposureAuto.SetValue( ExposureAuto_Continuous );
You can also use the Basler pylon Viewer application to easily set the parameters.
For more information about the pylon API and the pylon Viewer, see Section 3.1 on page 19.