Hi Amit,
If you are using Step/Direction Drives and the Direction never changes then the most obvious thing would be your Direction signal is not connected or not working or not configured correctly for your drives. Check the Direction Signal voltage on the drive and work backwards to find the problem.Similarly for Z -50 , z is again going towards positive direction, But in actual it has to go to Negative direction. and has to stop at Z-50.
But it is not doing that.
I don't understand what you mean by this statement.I am in doubt that this is because of proximity or JP5 pins.
Regards