跳转到内容

Device Temperature#

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

使用 Temperature State 功能(如果可用)可确定相机的当前内部温度状态。

该功能的使用#

确定设备温度#

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

  1. 如果 DeviceTemperatureSelector 参数可用,则将该参数设置为应该测量温度的所需位置,例如传感器
  2. 获取 DeviceTemperature 参数的值。

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

示例代码#

ace 2, boost, and dart R Cameras#
// 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 sensor
CEnumParameter(nodemap, "DeviceTemperatureSelector").SetValue("Sensor");
// Get the current device temperature
double d = CFloatParameter(nodemap, "DeviceTemperature").GetValue();
// Set the measuring location to sensor
camera.Parameters[PLCamera.DeviceTemperatureSelector].SetValue(PLCamera.DeviceTemperatureSelector.Sensor);
// 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 sensor */
errRes = PylonDeviceFeatureFromString(hdev, "DeviceTemperatureSelector", "Sensor");
CHECK(errRes);
/* Get the current device temperature */
errRes = PylonDeviceGetFloatFeature(hdev, "DeviceTemperature", &d);
CHECK(errRes);
# Set the measuring location to sensor
camera.DeviceTemperatureSelector.Value = "Sensor"
# Get the current device temperature
d = camera.DeviceTemperature.Value
ace Classic/U/L GigE 相机#
// Get the current device temperature
double d = camera.TemperatureAbs.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the current device temperature
double d = CFloatParameter(nodemap, "TemperatureAbs").GetValue();
// Get the current device temperature
double d = camera.Parameters[PLCamera.TemperatureAbs].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, "TemperatureAbs", &d);
CHECK(errRes);
# Get the current device temperature
d = camera.TemperatureAbs.Value
其他相机#
// 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);
# Get the current device temperature
d = camera.DeviceTemperature.Value

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