跳至內容
測試伺服器
開發伺服器

Device Temperature#

「Device Temperature 」相機功能可讓您測量相機內部各處(例如核心電路板、感測器電路板或相機外殼)的溫度。

請使用 Temperature State 功能(若可用)來判斷相機當前的內部溫度狀態。

使用功能#

確定Device Temperature#

要測量裝置溫度:

  1. 若 buffer operator 的 DeviceTemperatureSelector 若該參數可用,請將其設定為需測量溫度之目標位置,例如: Sensor.
  2. 取得 DeviceTemperature 參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。

溫度以攝氏度為單位的浮點數表示。

範例程式碼#

ace 2、boost 和 dart R 相機#
// 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

您也可以 use the pylon Viewer 來輕鬆設定參數。