Device Temperature#
請使用 Temperature State 功能(若可用)來判斷相機當前的內部溫度狀態。
使用功能#
確定Device Temperature#
要測量裝置溫度:
- 若 buffer operator 的
DeviceTemperatureSelector若該參數可用,請將其設定為需測量溫度之目標位置,例如:Sensor. - 取得
DeviceTemperature參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。
溫度以攝氏度為單位的浮點數表示。
範例程式碼#
ace 2、boost 和 dart R 相機#
/* 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 相機#
/* 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);
其他相機#
/* 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);
您也可以 use the pylon Viewer 來輕鬆設定參數。