Please enable JavaScript to view this site.

IDS peak 2.20.0 / uEye+ firmware 3.80

Navigation: C: Programming with IDS peak > How to program > Setting camera parameters

Loading/saving camera settings from/into the camera

Scroll Previous Top Next More

IDS Peak comfortSDK, genericSDK, AFL, ICL, and IPL developer manuals are external documents.
Please contact us if you need these manuals.

UserSets in genericSDK

UserSets in comfortSDK

Loading camera settings from camera

Saving camera settings into the camera

Defining camera parameters at startup

UserSets in genericSDK

You can save camera parameters on the camera or load them from the camera. For this, you use UserSets. The available UserSets can be read via the entries of the UserSetSelector.

UserSets in comfortSDK

You can save camera parameters on the camera or load them from the camera. For this, you use ParameterSets. The possible ParameterSets are predefined (see also UserSetSelector):

PEAK_PARAMETER_SET_DEFAULT

Default settings for Areascan

read-only

PEAK_PARAMETER_SET_LINESCAN

Default settings for line scan (not available for all cameras)

read-only

PEAK_PARAMETER_SET_LONG_EXPOSURE

Settings for long exposure (not available for all cameras)

read-only

PEAK_PARAMETER_SET_USER_1

Custom settings 1

read-write

PEAK_PARAMETER_SET_USER_2

Custom settings 2

read-write

Use the _GetList function to query the available ParameteSets.

Loading camera settings from camera

The standard UserSet/ParameterSet is named "Default". Additionally, you can use further UserSets/ParameterSets in which you can save or reload your own parameters. Furthermore, there are special UserSets/ParameterSets for some camera models, e.g. for long time exposure.

Saving camera settings into the camera

comfortC

peak_parameter_set parameterSet = PEAK_PARAMETER_SET_USER_1;
peak_access_status accessStatus = peak_CameraSettings_ParameterSet_GetAccessStatus(hCam, parameterSet);
if(PEAK_IS_WRITEABLE(accessStatus))
{
  // The parameters can be stored to the selected parameter set
  peak_status status = peak_CameraSettings_ParameterSet_Store(hCam, parameterSet);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
}
else
{
  // ...
}

genericC++

// Save parameters into user set 0
try
{
  // Set selector to "UserSet0"
  nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("UserSetSelector")->SetCurrentEntry("UserSet0");
 
  // Save user set
  nodeMapRemoteDevice->FindNode<peak::core::nodes::CommandNode>("UserSetSave")->Execute();
   
  // Wait until the UserSetSave command has been finished
  nodeMapRemoteDevice->FindNode<peak::core::nodes::CommandNode>("UserSetSave")->WaitUntilDone();
}
catch (const std::exception&)
{
  // ...
}

Defining camera parameters at startup

The UserSetDefault/Parameter Startup Set defines which parameter set is to be loaded when the camera starts. The saved parameters are automatically restored each time the camera is opened. This UserSet/ParameterSet is also loaded if the camera has lost power for a short time and is restarted by a reconnect. Therefore, it is recommended to adjust the UserSetDefault/Parameter Startup Set to the present application to reduce the startup time.

comfortC

peak_parameter_set parameterSet = PEAK_PARAMETER_SET_USER_1;
peak_access_status accessStatus = peak_CameraSettings_ParameterSet_GetAccessStatus(hCam, parameterSet);
if(PEAK_IS_READABLE(accessStatus))
{
  // The parameter set can be applied (precondition to use it as startup set)
   
  accessStatus = peak_CameraSettings_ParameterSet_Startup_GetAccessStatus(hCam);
  if(PEAK_IS_WRITEABLE(accessStatus))
  {
      // The startup set can be written
      status = peak_CameraSettings_ParameterSet_Startup_Set(hCam, parameterSet);
      if (PEAK_ERROR(status)) { /* Error handling ... */ }
  }
  else
  {
      // This should never happen ...
  }
}
else
{
  // The parameter set cannot be applied, maybe no parameters have been stored, yet
}

genericC++

try
{
  // Set the default user set that shall be loaded and enabled when camera resets to "Default"
  nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("UserSetDefault")->SetCurrentEntry("Default");
 
  // Of course you can specify another set, e.g. "UserSet0"
  nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("UserSetDefault")->SetCurrentEntry("UserSet0");
}
catch (const std::exception&)
{
  // ...
}

© 2026 IDS Imaging Development Systems GmbH