Debouncing Sensor Signals

General

With the sensors of the belts, the FB_Infeed POU verifies the infeed distance for new products. A rising and a falling edge of the sensor each are detected together as a new product. Thus, it must be made sure that a signal change of the sensor is only triggered by the beginning or the end of a product. Incorrect signals lead to non-existing products being recorded in the product manager. This means that the algorithm can no longer work without an error.

Four options are available to filter the sensor signals. The explanations refer to the fact that a positive signal edge represents a product beginning and a negative edge represents a product end.

oFilter rising edge - when searching the product beginning, short signal peaks shall be ignored

oIgnore falling edge - after a product beginning has been found, an early product end shall decrease

oFilter falling edge - when searching the product end, short signal drops shall be ignored

oIgnore rising edge - after a product end has been found, early detection of a product beginning shall decrease

Filter Rising Edges

When searching for the product beginning, temporary signal peaks shall decrease. If a positive signal edge is detected, the sensor signal must stay on TRUE without interruption until a time of timTimeFilterPosEdge has elapsed and/or the belt to which the sensor is allocated has covered a distance of lrPosFilterPosEdge in order for a signal edge to be identified as product beginning. If the sensor signal becomes FALSE at an earlier point in time, the next rising edge is waited for and it is verified again, whether this signal is held long enough.

Using this filter, interfering environmental impacts such as dust in the air can be compensated for.

Ignore Falling Edges

After detection of the product beginning, early detection of the product end shall decrease. If a positive edge has been detected, negative edges are ignored until a time of timIdleTimeAfter­PosEdge has elapsed and/or the belt to which the sensor is allocated has covered a distance of lrIdleDistanceAfterPosEdge. If the sensor signal is FALSE after this distance / period, the last suppressed negative edge is detected as the end of the product. The measurement starts as soon as a possible filtering of the rising edge concludes.

Using this filter, properties of the product, e.g. holes in the product, uneven and reflecting surfaces, etc. that helps prevent a continuous detection can be compensated for.

Filter Falling Edges

When searching for the product end, temporary signal drops shall be decreased. If a negative signal edge is detected, the signal of the sensor must stay on FALSE without interruption until a time of timTimeFilterNegEdge has elapsed and/or the belt to which the sensor is allocated has covered a distance of lrPosFilterNegEdge in order for the signal edge to be detected as product end. If the sensor signal becomes TRUE at an earlier point in time, the next falling edge is waited for and it is verified again whether this signal is held long enough.

Using this filter, properties of the product, e.g. holes in the product, uneven and reflecting surfaces, etc. that helps prevent a continuous detection can be compensated for.

Ignore Rising Edge

After the detection of the product end, early detection of the next product beginning shall decrease. If a negative edge has been detected, positive edges are ignored until a time of timIdleTimeAfter­NegEdge has elapsed and/or the belt to which the sensor is allocated has covered a distance of lrIdleDistanceAfterNegEdge. If the sensor signal is TRUE after this distance / period, the last suppressed positive edge is detected as beginning of the next product. The measurement starts as soon as a possible filtering of the negative edge is intergrated.

Using this filter, interfering environmental impacts such as dust in the air can be compensated for.

NOTE: Delayed signal output

If the filter "filter rising edge" or "filter falling edge" is activated, the products are detected with a delay. A positive or a negative edge of the sensor is only identified as product beginning or product end if the filter time has elapsed and/or the filter distance has been covered. The longer the filter time and/or the filter distance are/is set, the longer the delay. This delay leads to a decreased reaction distance in the algorithm in which corrections or velocityenhancements can be performed.

If the filter "Ignore falling edge" or "Ignore rising edge" is activated, the products are usually not detected with a delay. If the filter time and/or the filter distance are/is selected too large (the edge to be detected arrives within the filter time or the filter distance), this can also lead to delayed product detections.