Would just try at 5 for the Prechange and see if it helps. Do one thing at a time as then you will know what cured the problem. If that doesnt work then check the wiring from your breakout to the Z drive, paying particular attention to the Dir output as that could well be the culprit if it is not making good contact, will work sometimes and others not. If thats all ok then try the drive, if its still not right then swap outputs on the breakout for Z step and Dir (remembering to change also in Mach) and see if the problem then is with the stepping rather than the Direction. If it does change to ste problems then your breakout is the issue.
Hood