Please enable JavaScript to view this site.

IDS peak 2.8.0 / uEye+ firmware 3.33

Querying the minimum and maximum value of the frame rate

comfortC

peak_status status = PEAK_STATUS_SUCCESS;
peak_access_status accessStatus = peak_ExposureTime_GetAccessStatus(hCam);
if(PEAK_IS_READABLE(accessStatus))
{
  // FrameRate is readable
  double minFrameRate = 0.0;
  double maxFrameRate = 0.0;
  double incFrameRate = 0.0;
 
  // Query the minimum, maximum and increment
  status = peak_FrameRate_GetRange(hCam, &minFrameRate, &maxFrameRate, &incFrameRate);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
}

genericC++

// Query the minimum value
double minFrameRate = nodemapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("AcquisitionFrameRate")->Minimum();
 
// Query the maximum value
double maxFrameRate = nodemapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("AcquisitionFrameRate")->Maximum();

Querying the current value of the frame rate (unit Hz or frames/s)

comfortC

peak_status status = PEAK_STATUS_SUCCESS;
double frameRate = 0.0;
peak_access_status accessStatus = peak_FrameRate_GetAccessStatus(hCam);
if (PEAK_IS_READABLE(accessStatus))
{
  // FrameRate is readable, call the getter function
  status = peak_FrameRate_Get(hCam, &frameRate);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
}

genericC++

double frameRate = nodemapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("AcquisitionFrameRate")->Value();

Setting the frame rate

comfortC

peak_status status = PEAK_STATUS_SUCCESS;
double frameRate = 25.0;
peak_access_status accessStatus = peak_FrameRate_GetAccessStatus(hCam);
if (PEAK_IS_WRITEABLE(accessStatus))
{
  status = peak_FrameRate_Set(hCam, frameRate);
  if (PEAK_ERROR(status)) { /* Error handling ... */ }
}

genericC++

double frameRate = 25;
nodemapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("AcquisitionFrameRate")->SetValue(frameRate);

Complete example: Querying the range for the frame rate, the current value and setting a new, valid value

Prerequisite: The IDS peak API and a camera was opened (Device). See also Opening a camera (API)

© 2024 IDS Imaging Development Systems GmbH