Thanks Eddy that worked. Now I have a problem that when I do zero return to home the limit switch does not stop the axis. I tried this by trying to over ride it before it got to it with a metal object. The light on the switch does come on when touched with the metal object but the axis still keeps moving.
Regards
Sparky