Hi
I have been working on this with my friends setup.
Firstly, as the post says above, same pins as your x,y,z, ( on his 11,12,13 )
Secondly, ( important ) make sure your direction of travel for that axis is set up the right way, If its reversed in ports and pins, reverse it in home/limits setting. ( if not it will try run off the end of the table still )
And finally, ( our problem was this ), cheep Chinese cables absorb interference better than my children absorb cash ( and that takes some beating ) . So make sure your cables are clear of your power and spindle cables ect.