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 BslInputFilterTime parameter.
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.
Info
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.
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.
Info
Unlike the input filter time, specifying an input hold-off time does not increase the propagation delay.
Set the LineSelector parameter to the desired input line, e.g., Line1.
If you want to configure the input filter time, enter a value for the BslInputFilterTime parameter.
If you want to configure the input hold-off time, enter a value for the BslInputHoldOffTime parameter.
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 linecamera.LineSelector.SetValue(LineSelector_Line1);// Set the input filter time to 10 microsecondscamera.BslInputFilterTime.SetValue(10.0);// Set the input hold-off time to 20 microsecondscamera.BslInputHoldOffTime.SetValue(20.0);
INodeMap&nodemap=camera.GetNodeMap();// Select the desired input lineCEnumParameter(nodemap,"LineSelector").SetValue("Line1");// Set the input filter time to 10 microsecondsCFloatParameter(nodemap,"BslInputFilterTime").SetValue(10.0);// Set the input hold-off time to 20 microsecondsCFloatParameter(nodemap,"BslInputHoldOffTime").SetValue(20.0);
// Select the desired input linecamera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);// Set the input filter time to 10 microsecondscamera.Parameters[PLCamera.BslInputFilterTime].SetValue(10.0);// Set the input hold-off time to 20 microsecondscamera.Parameters[PLCamera.BslInputHoldOffTime].SetValue(20.0);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=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);
# Select the desired input linecamera.LineSelector.Value="Line1"# Set the input filter time to 10 microsecondscamera.BslInputFilterTime.Value=10.0# Set the input hold-off time to 20 microsecondscamera.BslInputHoldOffTime.Value=20.0