It sounds like a mechanical issue. Have you tried moving the axis back and forth by hand, with the power off? You might be able to detect an area where it's more resistant to motion than other places. Does the problem happen in various different places, or is there one region where it often gets stuck? Another thing that can cause this is a coupler coming loose. Sometimes a set screw can slip on the shaft and then the axis will move again, only to repeat the fault when you change direction.