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:
|
0 |
debounce filter switched off |
|
1 |
stretch rising edge |
|
2 |
stretch falling edge |
|
3 |
stretch both edges |
|
4 |
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.


