Table Of Contents

Debounce Filters

    Last Modified: May 15, 2018

    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

    Refer to the following table to calculate maximum filter times. 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.


    A debounce filter on digital inputs clears when the User Program first starts. Digital inputs that are true when the User Program starts will read false until the debounce filter time elapses.

    Recently Viewed Topics