Error Codes#

The Error Codes camera feature allows you to read error codes from the camera. These codes alert you to errors that can be corrected by yourself.

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 errors that you can correct yourself. 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 and boost Cameras#

To check error codes on ace 2 and boost 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 classic/U/L GigE Cameras#

To check error codes on ace classic/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 classic/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 an Acquisition Start trigger to the camera when the camera was not in a waiting for acquisition start condition.
Or:
The user has applied a Frame Start trigger to the camera when the camera was not in a waiting for frame start condition.
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 in the over temperature mode. 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 and boost Cameras#

// Check whether an error occured 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 occured on the device
bool errorPresent = CBooleanPtr(nodemap.GetNode("BslErrorPresent"))->GetValue();
// Get the first error code
int64_t errorReportValue = CIntegerPtr(nodemap.GetNode("BslErrorReportValue"))->GetValue();
// Retrieve the next error code from the device
CCommandPtr(nodemap.GetNode("BslErrorReportNext"))->Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Check whether an error occured 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 occured 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();
// Check whether an error occured on the device
bool errorPresent = Pylon.DeviceGetBooleanFeature(hdev, "BslErrorPresent");
// Get the first error code
Int64 errorReportValue = Pylon.DeviceGetIntegerFeature(hdev, "BslErrorReportValue");
// Retrieve the next error code from the device
Pylon.DeviceExecuteCommandFeature(hdev, "BslErrorReportNext");
/* 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 occured 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 classic/U/L GigE 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 = CEnumerationPtr(nodemap.GetNode("LastError"))->ToString();
// Clear the value of the last error code in the memory
CCommandPtr(nodemap.GetNode("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();
// Get the value of the last error code in the memory
string lasterror = Pylon.DeviceFeatureToString(hdev, "LastError");
// Clear the value of the last error code in the memory
Pylon.DeviceExecuteCommandFeature(hdev, "ClearLastError");
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.