It sounds like a motor tuning issue to me. What velocity and acceleration are you trying to run at? Try reducing both numbers on all your axes (especially Z) to half what they are set at and try your program again, then let us know how it worked, okay? Normally Z will have the most load on it, since it has to lift the spindle, so typically its velocity and acceleration are set lower than the other axes.
The other thing that you might check is your current-limiting resistors. If you've used the wrong ones and are starving your motors of amperage, that could cause stalling as well.
Andrew Werby
ComputerSculpture.com — Home Page for Discount Hardware & Software