Debounce
medium
Filter contact bounce by ignoring input transitions shorter than a preset time.
What it teaches
Ignore brief flickers in an input. The input has to stay in its new state for a set time before the output follows — the standard cure for button bounce or sensor noise.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Signal | BOOL | — | Raw input signal to be debounced |
| Cfg_Delay | DINT | 500 | Debounce time in milliseconds |
| Out_Signal | BOOL | — | Debounced output signal |
Required behavior
- Output transitions high when In_Signal is continuously high for Cfg_Delay milliseconds.
- Output transitions low when In_Signal is continuously low for Cfg_Delay milliseconds.
- Input excursions shorter than Cfg_Delay are ignored.