Device Temperature#
Use the Temperature State feature (if available) to determine the camera's current internal temperature state.
Using the Feature#
Determining the Device Temperature#
To determine the device temperature:
- If the
DeviceTemperatureSelector
parameter is available, set the parameter to the desired location where the temperature should be measured, e.g.,Sensor
. - Get the value of the
DeviceTemperature
parameter.
The temperature is given as a floating-point value in degrees Celsius.
Sample Code#
ace 2, boost, and dart R Cameras#
/* 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 sensor */
errRes = PylonDeviceFeatureFromString(hdev, "DeviceTemperatureSelector", "Sensor");
CHECK(errRes);
/* Get the current device temperature */
errRes = PylonDeviceGetFloatFeature(hdev, "DeviceTemperature", &d);
CHECK(errRes);
ace Classic/U/L GigE Cameras#
/* 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, "TemperatureAbs", &d);
CHECK(errRes);
Other Cameras#
/* 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.