Setting the hysteresis

A noisy setpoint may cause an accidental switch-off of the xSwitch output, e.g. in positive moving direction if the position difference becomes negative.

Remedy:

The lrHysterese input can be used to mask out the negative position difference to prevent tappet switch-off. You can either determine the position difference yourself or it can be cyclically output by the FB in order, for instance, to display the maximum value in the trace. The maximum value plus an addition (e.g. 20% of the measured maximum value) will then be used as the value for the lrHysterese input.

The PROPERTY output it to a lrVelocity (LREAL) serves to output the position difference per task cycle and write it to a variable in the program as follows:

lrPosDiffPerTask := L_MC2P_TappetRegister1.lrVelocity;

In the trace hysteresis, the xSwitch output is again set to FALSE for one cycle after switch-on by the negative position difference that gets visible by the lrPosDiffPerTask variable.

The value is approx. - 0.06 and this results in an approximate absolute value of 0.08 which, as a specification for the lrHysterese input, needs to be slightly higher than the amount of the value (0.06).

By carrying out another check for each trace, you can determine whether the bouncing of the xSwitch output has now been remedied.