Skip to content

Device Temperature#

The Device Temperature camera feature allows you to determine the camera temperature at various locations within the camera, e.g., core board, sensor board, or camera housing.

Using the Feature#

Determining the Device Temperature#

To determine the device temperature:

  1. If the DeviceTemperatureSelector parameter is available, set the parameter to the desired location where the temperature should be measured, e.g., Coreboard.
  2. Get the value of the DeviceTemperature parameter.

The temperature is given as a floating-point value in degrees Celsius.

Sample Code#

ace 2 and boost Cameras#

// Set the measuring location to core board
camera.DeviceTemperatureSelector.SetValue(DeviceTemperatureSelector_Coreboard);
// Get the current device temperature
double d = camera.DeviceTemperature.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Set the measuring location to core board
CEnumerationPtr(nodemap.GetNode("DeviceTemperatureSelector"))->FromString("Coreboard");
// Get the current device temperature
double d = CFloatPtr(nodemap.GetNode("DeviceTemperature"))->GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Set the measuring location to core board
CEnumParameter(nodemap, "DeviceTemperatureSelector").SetValue("Coreboard");
// Get the current device temperature
double d = CFloatParameter(nodemap, "DeviceTemperature").GetValue();
// Set the measuring location to core board
camera.Parameters[PLCamera.DeviceTemperatureSelector].SetValue(PLCamera.DeviceTemperatureSelector.Coreboard);
// Get the current device temperature
double d = camera.Parameters[PLCamera.DeviceTemperature].GetValue();
// Set the measuring location to core board
Pylon.DeviceFeatureFromString(hdev, "DeviceTemperatureSelector", "Coreboard");
// Get the current device temperature
double d = Pylon.DeviceGetFloatFeature(hdev, "DeviceTemperature");
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
double d = 0;
/* Set the measuring location to core board */
errRes = PylonDeviceFeatureFromString(hdev, "DeviceTemperatureSelector", "Coreboard");
CHECK(errRes);
/* Get the current device temperature */
errRes = PylonDeviceGetFloatFeature(hdev, "DeviceTemperature", &d);
CHECK(errRes);

Other Cameras#

// Get the current device temperature
double d = camera.DeviceTemperature.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the current device temperature
double d = CFloatPtr(nodemap.GetNode("DeviceTemperature"))->GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the current device temperature
double d = CFloatParameter(nodemap, "DeviceTemperature").GetValue();
// Get the current device temperature
double d = camera.Parameters[PLCamera.DeviceTemperature].GetValue();
// Get the current device temperature
double d = Pylon.DeviceGetFloatFeature(hdev, "DeviceTemperature");
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
double d = 0;
/* Get the current device temperature */
errRes = PylonDeviceGetFloatFeature(hdev, "DeviceTemperature", &d);
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.