跳转到内容

Device Temperature#

相机的 Device Temperature 功能可让您确定相机内部不同位置的相机温度,例如核心板、传感器板或相机外壳。

Use the Temperature State feature (if available) to determine the camera's current internal temperature state.

该功能的使用#

确定设备温度#

要确定 device temperature,请执行以下操作:

  1. If the DeviceTemperatureSelector parameter is available, set the parameter to the desired location where the temperature should be measured, e.g., Sensor.
  2. 获取 DeviceTemperature 参数的值。

温度以摄氏度为单位给出浮点值。

示例代码#

ace 2、boost 和 dart IMX 相机#

// Set the measuring location to sensor
camera.DeviceTemperatureSelector.SetValue(DeviceTemperatureSelector_Sensor);
// Get the current device temperature
double d = camera.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();
/* 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);

其他相机#

// Get the current device temperature
double d = camera.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();
/* 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);

您也可以使用 pylon Viewer 轻松设置参数。