Line Debouncer#
仅允许足够长的信号传递到相机并生效。
This feature is similar to the Input Filter feature, which is only available on ace 2, boost, and dart R cameras.
该功能的使用#
运作原理#
线路消抖会从传入的硬件触发信号的上升沿和下降沿中滤除不需要的短信号(触点颤动)。为此,线路消抖会评估硬件信号逻辑状态的所有变化和持续时间。
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 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.
启用 Line Debouncer#
- 确保将相机配置为进行硬件触发。
- 设置
LineSelector
parameter to the desired input line, e.g.,Line1
. - Enter a value for the
LineDebouncerTime
parameter.
选择消抖值#
- Choosing a
LineDebouncerTime
value that is too low results in accepting invalid signals and signal states. - 选择一个过高的值会导致有效信号和信号状态被拒绝。
选择线路去抖时间时,Basler 建议选择比无效信号的最长预期持续时间稍长的时间。
拒绝有效短信号的风险很小,但是在大多数情况下,这种方法应能产生良好的结果。因此应监视您的应用,并在发现有过多有效信号被拒绝时,视需要调整值。
示例代码#
ace Classic/U/L GigE 相机#
/* 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);
其他相机#
/* 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);
您也可以使用 pylon Viewer 轻松设置参数。