Table Of Contents

Debounce Filters

    Last Modified: September 6, 2017

    You can set debounce filters on any digital input channel.

    Figure 1. Debounce Filter

    Debounce filters are timers that debounce mechanical switches or filter noise and transitions.

    The filter timer begins at the rising or falling edge of the unfiltered input signal. The User Program reads the previous value of the signal for the duration of the filter time. After the filter time elapses and no new edges on the input signal have occurred, the User Program reads the new signal value. The filter timer restarts at the next edge of the of the unfiltered input signal.

    Figure 2. Debounce Filter on an Active High Input
    Figure 3. Debounce Filter on an Active Low Input

    The maximum filter time that is guaranteed to be filtered out and the maximum signal time that is guaranteed to be detected is defined in the table below. For information on calculating input signal response times, refer to the Input Signal Response Time section.

    Table 1. Calculating Debounce Filter Times
    DI Configuration Filtered Signal Time Maximum Detected Signal Time Minimum
    Single input and dual input Debounce filter time - 15 µs Input signal response time (0 to 1)
    Single input with test pulse and dual input with test pulse Debounce filter time - (2 × test pulse width) - (2 × debounce constant) - 43 µs

    To turn off filters, set filter value to 0.


    To use debounce filters with test pulses, refer to the Filter Times for Test Pulses section for maximum and minimum debounce filter values.

    Recently Viewed Topics