Error Codes#
If several different errors occur, they are stored in an error list and can be retrieved one by one.
Using the Feature#
How It Works#
The camera can detect certain errors. If such an error occurs, the camera assigns an error code to this error and stores the error code in memory.
If several different errors occur, the camera stores the code for each type of error detected. The camera stores each code only once regardless of how many times it has detected the corresponding error.
Checking Error Codes#
Checking error codes is an iterative process, depending on your camera model and how many errors have occurred.
ace 2, boost, dart M/R, and racer 2 Cameras#
Basler ace 2, boost, dart M/R, and racer 2 cameras can generate a list of errors that can be evaluated by Basler support.
To check error codes on ace 2, boost, dart M/R, and racer 2 cameras:
- Get the value of the
BslErrorPresent
parameter. - If the parameter value is
true
:- Get the value of the
BslErrorReportValue
parameter. - Store the value on your computer or write it down for further reference.
- Execute the
BslErrorReportNext
command. This retrieves the next error code from the device. - Repeat steps a) to c) until the
BslErrorReportValue
parameter value is0
. A parameter value of 0 means that there are no more error codes to retrieve. - Contact Basler support with the list of error codes.
- Get the value of the
ace U/L Cameras#
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:
- Get the value of the
LastError
parameter. - Store the value on your computer or write it down for further reference.
- Execute the
ClearLastError
command. This deletes the last error code from the list of error codes. - Repeat steps 1) to 3) until the
LastError
parameter value isNoError
. - Troubleshoot the errors using the table below or contact Basler support with the list of error codes.
Available Error Codes#
The following table applies to Basler ace U/L cameras only.
LastError Enumerator | Meaning |
---|---|
NoError | The camera hasn't detected any errors since the last time the error memory was cleared. |
Overtrigger | An overtrigger has occurred. The user has applied a trigger signal to the camera when the camera wasn't ready for it. |
Userset | An error occurred when attempting to load a user set. Typically, this means that the user set contains an invalid value. Try loading a different user set. |
InvalidParameter | A parameter has been entered that is out of range or otherwise invalid. Typically, this error only occurs when the user sets parameters via direct register access. |
OverTemperature | The camera supports the Temperature State feature and is above the over temperature threshold. This error indicates that damage to camera components may occur. |
PowerFailure | This error indicates that the power supply is not sufficient. Check the power supply. |
InsufficientTriggerWidth | This error is reported in Trigger Width exposure mode, when a trigger is shorter than the minimum exposure time. |
Sample Code#
ace 2, boost, dart M and dart R Cameras#
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);
ace U/L Cameras#
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);
You can also use the pylon Viewer to easily set the parameters.