Skip to content

Line Debouncer#

The Line Debouncer camera feature allows you to filter out unwanted short hardware input signals.

Only sufficiently long signals are allowed to pass through to the camera and become effective.

This feature is similar to the Input Filter feature, which is only available on ace 2, boost, and dart R cameras.

Using the Feature#

How It Works#

The line debouncer filters out unwanted short signals (contact bounce) from the rising and falling edges of incoming hardware trigger signals. To achieve this, the line debouncer evaluates all changes and durations of logical states of hardware signals.

The maximum duration of this evaluation period is defined by the LineDebouncerTime parameter. The line debouncer acts like a clock that measures the durations of the signals to identify valid signals.

The clock starts counting whenever a hardware signal changes its logical state (high to low or vice versa):

  • If the duration of the new logical state is shorter than the line debouncer time specified, the new logical state is considered invalid and has no effect.
  • If the duration of the new logical state is as long as the line debouncer time or longer, the new logical state is considered valid and is allowed to become effective in the camera.

Info

Specifying a line debouncer time introduces a delay between a valid trigger signal arriving at the camera and the moment the related change of logical state is passed on to the camera.

The duration of the delay is at least equal to the value of the LineDebouncerTime parameter. This is because the camera waits for the time specified to determine whether the signal is valid. Similarly, the line debouncer delays the end of a valid trigger signal.

The figure below illustrates how the line debouncer filters out invalid signals from the rising and falling edge of a hardware trigger signal. Line debouncer times that allow a change of logical state in the camera are labeled "OK". Also illustrated are the delays relative to the hardware trigger signal.

Effect of the Line Debouncer on an Input Signal

Enabling the Line Debouncer#

  1. Make sure the camera is configured for hardware triggering.
  2. Set the LineSelector parameter to the desired input line, e.g., Line1.
  3. Enter a value for the LineDebouncerTime parameter.

Choosing the Debouncer Value#

  • Choosing a LineDebouncerTime value that is too low results in accepting invalid signals and signal states.
  • Choosing a value that is too high results in rejecting valid signals and signal states.

Basler recommends choosing a line debouncer time that is slightly longer than the longest expected duration of an invalid signal.

There is a small risk of rejecting short valid signals but in most scenarios this approach should deliver good results. Monitor your application and, if necessary, adjust the value if you find that too many valid signals are being rejected.

Sample Code#

ace Classic/U/L GigE Cameras#
// Select the desired input line
camera.LineSelector.SetValue(LineSelector_Line1);
// Set the parameter value to 10 microseconds
camera.LineDebouncerTimeAbs.SetValue(10.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the desired input line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Set the parameter value to 10 microseconds
CFloatParameter(nodemap, "LineDebouncerTimeAbs").SetValue(10.0);
// Select the desired input line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Set the parameter value to 10 microseconds
camera.Parameters[PLCamera.LineDebouncerTimeAbs].SetValue(10.0);
/* 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 */
/* Select the desired input line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Set the parameter value to 10 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "LineDebouncerTimeAbs", 10.0);
CHECK(errRes);
# Select the desired input line
camera.LineSelector.Value = "Line1"
# Set the parameter value to 10 microseconds
camera.LineDebouncerTimeAbs.Value = 10.0
Other Cameras#
// Select the desired input line
camera.LineSelector.SetValue(LineSelector_Line1);
// Set the parameter value to 10 microseconds
camera.LineDebouncerTime.SetValue(10.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the desired input line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Set the parameter value to 10 microseconds
CFloatParameter(nodemap, "LineDebouncerTime").SetValue(10.0);
// Select the desired input line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Set the parameter value to 10 microseconds
camera.Parameters[PLCamera.LineDebouncerTime].SetValue(10.0);
/* 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 */
/* Select the desired input line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Set the parameter value to 10 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "LineDebouncerTime", 10.0);
CHECK(errRes);
# Select the desired input line
camera.LineSelector.Value = "Line1"
# Set the parameter value to 10 microseconds
camera.LineDebouncerTime.Value = 10.0

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