This feature is similar to the Line Debouncer feature, which is only available on ace Classic/U/L cameras.
Using the Feature#
How It Works#
You can control input filtering by configuring one or both of the following camera settings:
Input Filter Time#
Digital input signals often aren't perfectly formed when they arrive at the camera. They can pick up noise and interference from ambient electromagnetic fields, especially when long I/O cables are used, or from power equipment nearby. Also, switch outputs can cause crosstalk.
As a result, a change from "low" to "high", or vice versa, can take several microseconds, with the logic level being undefined during the transition.
Specifying an input filter time allows you to eliminate most of these problems.
The input filter evaluates all changes and durations of logical states of the input signal. The duration of this evaluation period is defined by the
During evaluation, the camera calculates the mean value over time and applies a threshold function to the result to reconstruct the digital signal. This removes noise, interference, etc. as well as signal pulses shorter than the filter time.
If you specify an input filter time and the input signal is not steady after the original transition, the propagation delay increases.
This means that the period of time between the change of the analog I/O signal and the change of the camera's internal status will be longer.
Input Hold-Off Time#
Setting an input hold-off time is useful if you want to avoid false triggering caused by multiple trigger signals arriving in quick succession (contact bounce).
If an input hold-off time is set and an input trigger signal arrives, the camera accepts the signal and stops accepting any further trigger signals or signal changes until the hold-off time has elapsed.
For example, if you set the
BslInputHoldOffTime parameter to 10 and apply a trigger signal to the camera, the camera accepts the signal and stops accepting any further trigger signals or signal changes for 10 milliseconds.
Unlike the input filter time, specifying an input hold-off time does not increase the propagation delay.
Configuring Input Filtering#
- Make sure the camera is configured for hardware triggering.
- Set the
LineSelectorparameter to the desired input line, e.g.,
- If you want to configure the input filter time, enter a value for the
- If you want to configure the input hold-off time, enter a value for the
Choosing the Input Filter and Input Hold-Off Time#
- Choosing an input filter time or input hold-off time that is too low results in accepting invalid signals and signal states.
- Choosing an input filter time or input hold-off time that is too high results in rejecting valid signals and signal states.
Basler recommends the following approaches:
- Choose an input filter time that is slightly longer than the longest expected duration of an invalid signal.
- Chose an input hold-off time that is slightly shorter than the shortest expected interval between two valid signals.
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 values if you find that too many valid signals are being rejected.
// Select the desired input line camera.LineSelector.SetValue(LineSelector_Line1); // Set the input filter time to 10 microseconds camera.BslInputFilterTime.SetValue(10.0); // Set the input hold-off time to 20 microseconds camera.BslInputHoldOffTime.SetValue(20.0);
INodeMap& nodemap = camera.GetNodeMap(); // Select the desired input line CEnumParameter(nodemap, "LineSelector").SetValue("Line1"); // Set the input filter time to 10 microseconds CFloatParameter(nodemap, "BslInputFilterTime").SetValue(10.0); // Set the input hold-off time to 20 microseconds CFloatParameter(nodemap, "BslInputHoldOffTime").SetValue(20.0);
// Select the desired input line camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1); // Set the input filter time to 10 microseconds camera.Parameters[PLCamera.BslInputFilterTime].SetValue(10.0); // Set the input hold-off time to 20 microseconds camera.Parameters[PLCamera.BslInputHoldOffTime].SetValue(20.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 input filter time to 10 microseconds */ errRes = PylonDeviceSetFloatFeature(hdev, "BslInputFilterTime", 10.0); CHECK(errRes); /* Set the input hold-off time to 20 microseconds */ errRes = PylonDeviceSetFloatFeature(hdev, "BslInputHoldOffTime", 20.0); CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.