Hi,
Welcome to the forum.
Can the 10mm be any over run of the motor, when you stop it, after you initially encounter the limit switch and reset the encoder?
Do you reset the encoder to 0 when you encounter the limit switch or when you move back off the limit.
Over run will add an offset to the encoder position.
If you have issued the Home/Fully closed action, why don't you look for the closed limit, rather than count position?
It will close completely everytime then.
Tom.... ![]()