Problem: subspindle zero moves about 10 degrees

Sometimes subspindle goes to different origin.
Usually when machine is started, you have to check if origin is correct.
If it is at "wrong" origin you have to start machine again to find correct origin.

How subspindle detect origin, is there limit sw or pulse coder ?
Or does it use both ?