// Set the auto function profile to Minimize Gaincamera.AutoFunctionProfile.SetValue(AutoFunctionProfile_MinimizeGain);// Set the auto function profile to Minimize Exposure Timecamera.AutoFunctionProfile.SetValue(AutoFunctionProfile_MinimizeExposureTime);// Enable Gain and Exposure Auto auto functions and set the operating mode to Continuouscamera.GainAuto.SetValue(GainAuto_Continuous);camera.ExposureAuto.SetValue(ExposureAuto_Continuous);
INodeMap&nodemap=camera.GetNodeMap();// Set the auto function profile to Minimize GainCEnumParameter(nodemap,"AutoFunctionProfile").SetValue("MinimizeGain");// Set the auto function profile to Minimize Exposure TimeCEnumParameter(nodemap,"AutoFunctionProfile").SetValue("MinimizeExposureTime");// Enable Gain and Exposure Auto auto functions and set the operating mode to ContinuousCEnumParameter(nodemap,"GainAuto").SetValue("Continuous");CEnumParameter(nodemap,"ExposureAuto").SetValue("Continuous");
// Set the auto function profile to Minimize Gaincamera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.MinimizeGain);// Set the auto function profile to Minimize Exposure Timecamera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.MinimizeExposureTime);// Enable Gain and Exposure Auto auto functions and set the operating mode to Continuouscamera.Parameters[PLCamera.GainAuto].SetValue(PLCamera.GainAuto.Continuous);camera.Parameters[PLCamera.ExposureAuto].SetValue(PLCamera.ExposureAuto.Continuous);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Set the auto function profile to Minimize Gain */errRes=PylonDeviceFeatureFromString(hdev,"AutoFunctionProfile","MinimizeGain");CHECK(errRes);/* Set the auto function profile to Minimize Exposure Time */errRes=PylonDeviceFeatureFromString(hdev,"AutoFunctionProfile","MinimizeExposureTime");CHECK(errRes);/* Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous */errRes=PylonDeviceFeatureFromString(hdev,"GainAuto","Continuous");CHECK(errRes);errRes=PylonDeviceFeatureFromString(hdev,"ExposureAuto","Continuous");CHECK(errRes);
# Set the auto function profile to Minimize Gaincamera.AutoFunctionProfile.Value="MinimizeGain"# Set the auto function profile to Minimize Exposure Timecamera.AutoFunctionProfile.Value="MinimizeExposureTime"# Enable Gain and Exposure Auto auto functions and set the operating mode to Continuouscamera.GainAuto.Value="Continuous"camera.ExposureAuto.Value="Continuous"
You can also use the pylon Viewer to easily set the parameters.