Skip to content

Error Codes#

The Error Codes camera feature allows you to read error codes from the camera.

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:

  1. Get the value of the BslErrorPresent parameter.
  2. If the parameter value is true:
    1. Get the value of the BslErrorReportValue parameter.
    2. Store the value on your computer or write it down for further reference.
    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 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:

  1. Get the value of the LastError parameter.
  2. Store the value on your computer or write it down for further reference.
  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. 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#
// 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 Cameras#
// 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()

You can also use the pylon Viewer to easily set the parameters.