Device Temperature#
Use the Temperature State feature (if available) to determine the camera's current internal temperature state.
機能を使用する#
Device Temperatureの確認#
デバイスの温度を確認するには、次の手順に従います。
DeviceTemperatureSelector
パラメーターが使用可能な場合は、温度を測定する必要のある場所(Sensor
など)にパラメーターを設定します。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を使用して、パラメーターを簡単に設定することもできます。