Redundant instruction
This is a redundant instruction. It is replaced by: FP_DEBOUNCE
Filter processing is executed for specified bits and output bitwise. The instruction can be useful to negate the effects of bounce, e.g. for a switching device.
Input
Input data whose bits will be filtered according to the input mask
Input mask which specifies which bits will be filtered
Specifies the minimum off- and on-time in ms
Output
Filtered data
Instead of using this F instruction, we recommend using the corresponding FP7 instruction: FP_DEBOUNCE
When the system detects a trigger's rising edge, all the bits of the input specified by s1_InputData are output directly in d_OutputData and the effects of bounce are not prevented. A scan time error may occur during filter processing, for a maximum of 1 scan.
For bits stored in the area specified by s1_InputData a debouncing is executed if the resulting value for s2_InputMask is "1". The result of the debouncing operation is output to d_OutputData. The debouncing time is defined via s3_FilterTime (0 to 30000ms). If s2_InputMask is "0" no debouncing takes place and the corresponding bit at s1_InputData passes unchanged to d_OutputData.
In the following figure, the bits in d_OutputData and their values will be the same as s1_InputData after the filter time has elapsed or, for example, if no masking takes place, e.g. s2_InputMask is assigned the value 0.
1 (16#0001) is assigned to s2_InputMask is , i.e. bit 0 will be filtered, the other bits will not be filtered, and the value assigned to s3_FilterTime is 500ms.
0 (16#0000) is assigned to s2_InputMask is , i.e. bit 0 to F will be not filtered
if the filter processing time specified by s3_FilterTime is less than 0 or greater than 30000.
if the filter processing time specified by s3_FilterTime is less than 0 or greater than 30000.