Device Temperature#
Using the Feature#
Determining the Device Temperature#
To determine the temperature of the camera's core board or sensor board, get the value of the DeviceTemperature parameter.
The temperature is given as a floating-point value in degrees Celsius.
Additional Parameters#
The camera also provides a TemperatureSelector parameter. This allows you to choose the location within the device where the temperature is measured.
On Basler cameras, the parameter is preset and can't be changed.
Sample Code#
// 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.