If you want to use debounce filters, these are made as configuration output and configured as Off-task connector (OTC) or function block.

Meaning of the outputs

DebounceTypex: debounce filter for digital signals

DebounceTimeUsx: debounce time for the single digital signal

First, drag the output signals defined in the I/O configurator to the margin of the programming surface, in this example “X1_DebType_Ch00” und “X1_DebTime_Ch00” for the digital input 0.

Create a new Off-task connector in the programming window, assign a meaningful name to the connector, e.g. “Filter type” and choose “Input” and Data type “UINT” under the Connector type option.

Meaning of the default values for the debounce filter:

  1. Debounce filter switched off

  2. Stretch rising edge

  3. Stretch falling edge

  4. Stretch both edges

  5. Delay both edges

You find the explanations of the settings in chapter Debounce filter inputs.

Now, connect the OTC and the signal on the margin of the programming surface.

Create a new OTC, assign a meaningful name, e.g. debounce time and choose “Input” as type. Enter the debounce time in µs in the “Default value“ field. The value can be 65535 at max.

Now, connect the OTC and the signal on the margin of the programming surface.