BD15_DIGITAL_FILTER
PROGRAM BD15_TEST
VAR
IN1, OUT1: BOOL;
FB: LIB.CORE.V1_0.BD15_DIGITAL_FILTER;
END_VAR
FB(IN:=IN1);
OUT1:=FB.OUT;
END_PROGRAM
LIB\CORE
V1.0
The block copies the input IN to the output OUT with a functionality that the OUT value changes not more frequently than every T seconds. This means that the block filters fast input changes, see figure below. The block is used to filter, or debounce, the input signal.
Input | Type | Description | Default value |
---|---|---|---|
IN | BOOL | Input value | False |
T | TIME | The block does not change the output OUT faster than once every T secs | 5s |
Output | Type | Description |
---|---|---|
OUT | BOOL | Filtered output signal |
TRES | TIME | Timeout to next possible change of output (TRES = 0 - the block is ready, TRES > 0 - the block is waiting). |
The block is used to prevent a digital signal from bouncing. The pulse generator is simulating the bounced signal, at the BD15 block output there is filtered (debounced) signal.