コンテンツにスキップ

Error Codes#

Error Codesカメラ機能を使用すると、カメラからエラーコードを読み取ることができます。

複数の異なるエラーが発生した場合は、エラーリストに保存され、1つずつ取得できます。

機能を使用する#

仕組み#

カメラは特定のエラーを検出できます。そのようなエラーが発生すると、カメラはこのエラーにエラーコードを割り当て、エラーコードをメモリーに保存します。

複数の異なるエラーが発生した場合、カメラは検出されたエラーの種類ごとにコードを保存します。カメラは、対応するエラーを何回検出したかに関係なく、各コードを1回だけ保存します。

Error Codesの確認#

エラーコードの確認は、カメラのモデルと発生したエラーの数に応じた反復的なプロセスです。

ace 2, boost, dart M and dart R Cameras#

Basler ace 2, boost, dart M, and dart R cameras can generate a list of errors that can be evaluated by Basler support.

To check error codes on ace 2, boost, dart M, and dart R cameras:

  1. Get the value of the BslErrorPresent parameter.
  2. パラメーター値が次の場合 true:
    1. Get the value of the BslErrorReportValue parameter.
    2. コンピューターに値を保存するか、後で参照できるように書き留めます。
    3. Execute the BslErrorReportNext command. This retrieves the next error code from the device.
    4. Repeat steps a) to c) until the BslErrorReportValue parameter value is 0. A parameter value of 0 means that there are no more error codes to retrieve.
    5. Contact Basler support with the list of error codes.

ace U/Lカメラ#

Basler ace U/L cameras can generate a list of errors that can be corrected by yourself or evaluated by Basler support.

To check error codes on ace U/L GigE cameras:

  1. Get the value of the LastError parameter.
  2. コンピューターに値を保存するか、後で参照できるように書き留めます。
  3. Execute the ClearLastError command. This deletes the last error code from the list of error codes.
  4. Repeat steps 1) to 3) until the LastError parameter value is NoError.
  5. 次の表を使用してエラーのトラブルシューティングを行うか、エラーコードのリストを使用してBaslerサポートに問い合わせます
使用可能なError Codes#

The following table applies to Basler ace U/L cameras only.

LastError Enumerator 意味
NoError エラーメモリが最後にクリアされてから、カメラでエラーが検出されませんでした。
Overtrigger An overtrigger has occurred.
The user has applied a trigger signal to the camera when the camera wasn't ready for it.
Userset ユーザーセットをロードしようとしたときにエラーが発生しました。通常、これはユーザーセットに無効な値が含まれていることを意味します。別のユーザーセットをロードしてみてください。
InvalidParameter 範囲外または無効なパラメーターが入力されました。通常、このエラーは、ユーザーが直接レジスターアクセスを介してパラメーターを設定した場合にのみ発生します。
OverTemperature カメラはTemperature State機能をサポートしており、過熱しきい値を超えています。このエラーは、カメラコンポーネントが損傷する可能性があることを示します。
PowerFailure このエラーは、電力供給が十分でないことを示します。
電力供給状況を確認してください。
InsufficientTriggerWidth このエラーは、トリガーが最小露光時間より短い場合にTrigger Width露光モードで報告されます。

サンプルコード#

ace 2, boost, dart M and dart R Cameras#
// Check whether an error occurred on the device
bool errorPresent = camera.BslErrorPresent.GetValue();
// Get the first error code
int64_t errorReportValue = camera.BslErrorReportValue.GetValue();
// Retrieve the next error code from the device
camera.BslErrorReportNext.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Check whether an error occurred on the device
bool errorPresent = CBooleanParameter(nodemap, "BslErrorPresent").GetValue();
// Get the first error code
int64_t errorReportValue = CIntegerParameter(nodemap, "BslErrorReportValue").GetValue();
// Retrieve the next error code from the device
CCommandParameter(nodemap, "BslErrorReportNext").Execute();
// Check whether an error occurred on the device
bool errorPresent = camera.Parameters[PLCamera.BslErrorPresent].GetValue();
// Get the first error code
Int64 errorReportValue = camera.Parameters[PLCamera.BslErrorReportValue].GetValue();
// Retrieve the next error code from the device
camera.Parameters[PLCamera.BslErrorReportNext].Execute();
/* 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 */
_Bool errorPresent = false;
int64_t errorReportValue = 0;
/* Check whether an error occurred on the device */
errRes = PylonDeviceGetBooleanFeature(hdev, "BslErrorPresent", &errorPresent);
CHECK(errRes);
/* Get the first error code */
errRes = PylonDeviceGetIntegerFeature(hdev, "BslErrorReportValue", &errorReportValue);
CHECK(errRes);
/* Retrieve the next error code from the device */
errRes = PylonDeviceExecuteCommandFeature(hdev, "BslErrorReportNext");
CHECK(errRes);
# Check whether an error occurred on the device
errorPresent = camera.BslErrorPresent.Value
# Get the first error code
errorReportValue = camera.BslErrorReportValue.Value
# Retrieve the next error code from the device
camera.BslErrorReportNext.Execute()
ace U/Lカメラ#
// Get the value of the last error code in the memory
LastErrorEnums lasterror = camera.LastError.GetValue();
// Clear the value of the last error code in the memory
camera.ClearLastError.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Get the value of the last error code in the memory
String_t lasterror = CEnumParameter(nodemap, "LastError").GetValue();
// Clear the value of the last error code in the memory
CCommandParameter(nodemap, "ClearLastError").Execute();
// Get the value of the last error code in the memory
string lasterror = camera.Parameters[PLCamera.LastError].GetValue();
// Clear the value of the last error code in the memory
camera.Parameters[PLCamera.ClearLastError].Execute();
size_t len = 0;
char lasterror_str[64] = {0};
/* Get the value of the last error code in the memory */
len = sizeof(lasterror_str);
errRes = PylonDeviceFeatureToString(hdev, "LastError", lasterror_str, &len);
CHECK(errRes);
/* Clear the value of the last error code in the memory */
errRes = PylonDeviceExecuteCommandFeature(hdev, "ClearLastError");
CHECK(errRes);
# Get the value of the last error code in the memory
lasterror = camera.LastError.Value
# Clear the value of the last error code in the memory
camera.ClearLastError.Execute()

pylon Viewerを使用して、パラメーターを簡単に設定することもできます。