Guys, I don't know what to say...
Thank You so much Chris!
What a day! My third child was born five minutes after midnight and now my almost home made focuser seems to work! Now its time for some beer... a lot of them.
Solution is so simple, I tried to implement mutex in code, but it was too much for me, as usually I took the hammer to kill the mosquito...
Thanks again, I will report how it will work after mechanical assembly.
Michal