Z Movement loosing steps, reproducable any height, with this code

So I had a program I was running and everytime it hit a specific spot the Z axis would stutter like it hit something, almost like a harmonic was reached in the stepper causing it to loose steps. What I am curious about is this specific to my machine, does it happen with other machines? I have a 2020 4896 with nema 34 motors from avid.

zone1-test.zip (566 Bytes)

Download/extract the tap file, it is only 50 lines long including comment lines. To reproduce you really don’t need a tool loaded, set the z0 to an inch ( use some reference block, like a 123 block) or so off the deck, and run it and see when you do an MDI g0 z0 if z is back to your original height.

is the make feed rate of the z-axis being exceeded? I had many other moves at that same feed rate for the z axis that did not stutter, but had a different number of steps, etc.

Any test results or thoughts on why this would occur is appreciated. Again it happens at any z starting height…



for those that don’t want to download it, here is the gcode





(T1 D=0.25 CR=0. - ZMIN=-0.7589 - FLAT END MILL)

G90 G94 G91.1 G40 G49 G17




T1 M6

(S14000 M3)


G0 X34.3631 Y9.0612


G1 Z-0.2447 F210.

X34.3632 Z-0.2477

X34.3638 Y9.0611 Z-0.2507

X34.3647 Y9.0609 Z-0.2536

X34.3653 Z-0.2549

X34.3659 Y9.0608 Z-0.2563

X34.3667 Y9.0607 Z-0.2576

X34.3674 Z-0.2589

X34.3684 Z-0.2601

X34.3693 Z-0.2613

X34.37 Y9.0608 Z-0.262

X34.3707 Z-0.2627

X34.3714 Y9.0609 Z-0.2634

X34.3722 Y9.061 Z-0.264

X34.373 Y9.0612 Z-0.2646

X34.3738 Y9.0613 Z-0.2653

X34.3746 Y9.0615 Z-0.2658

X34.3754 Y9.0618 Z-0.2663

X34.3762 Y9.062 Z-0.2668

X34.3771 Y9.0624 Z-0.2672

X34.378 Y9.0627 Z-0.2676

X34.3788 Y9.0631 Z-0.2681

X34.3797 Y9.0635 Z-0.2684

X34.3805 Y9.064 Z-0.2687

X34.3813 Y9.0645 Z-0.269

X34.3822 Y9.065 Z-0.2691

X34.383 Y9.0656 Z-0.2693

X34.3838 Y9.0662 Z-0.2695

X34.386 Y9.0682 Z-0.2697

(G2 X34.3962 Y9.0778 I0.1279 J-0.1257 F105.

G0 Z1.)

(G0 G53 Z0)



1 Like

Sorry the posted file has the feed rate that causes it to fail commented out on line 17, uncomment line 18 and comment line 17 for the failure to occur. Already changed in the gcode post above, but couldn’t figure out how to reupload a file. The file on this reply has been corrected to cause the failure.

G1 Z-0.2447 F110. ----- Delete or comment out this line

(G1 Z-0.2447 F210.) ------- Uncomment this one…

zone1-test.zip (566 Bytes)

It looks like you are doing z-moves at 210ipm, I think the max z feedrate is 200. I was also getting stutter when my tolerance was too high and I was feeding the machine commands too fast, it may be worth looking at that if slowing the z feedrate down doesnt work.

1 Like

I don’t know why I had it in my head it was 250ipm for Z. But yes slowing down the Z works. I was just thinking 210 should be doable, but I guess the number I had was wrong.

I have a question that I think is related to this. I have an AVID PRO4848 with Nema 34 from Avid Plug and Play kit. Avid’s website shows a cutting speed of 500 IPM for the Nema 34 models. Is their spec incorrect for cutting IPM?

I have an Amana tool 1/2" ball nose endmill, and the feed rate is set at 300 IPM. This happened twice during a cut: the Z-axis stalled when combining Y and Z-axis movement. I was able to repeat the Z-axis stalling with an air cut. Dropping feedrate to F200 and the z-axis didn’t stall. I did a manual rapid jogging with IPM set to 600, and the Z axis worked fine. No stalling?

Help me understand what’s going on.

As I mentioned above, Z axis max feedrate is 200, set your z moves to a lower speed.

With this code:

G0 Y0.0 Z0.0
G1 Y0.01 Z1.0 F300

the Z rate component would be 299.99 ipm. With fast 3D commands in general, I would expect the Z-axis component of the input rate command to exceed the Z-axis limit at times.

I would not expect this to be a problem, though. The Avid Mach4 settings include a 200 ipm rate limit for the Z axis, and Mach4 scales the commanded rate so that the per-axis rates don’t exceed their settings.

For example, I just fired up my machine and ran the above code block in MDI with F600. In the area of the Mach4 display with the feed rates, percentages, and arrows, it showed 600 ipm as the input command and values around 200 ipm as the output command.

If your Z-axis limit setting is 200 ipm, and you have a snippet of code that repeats the issue, then I would be interested in seeing it, and Avid support might, too. You can double-check your axis rate limits in the motor settings in Configure > Control.

1 Like

I can confirm that the z-axis does have a 200 IPM velocity limit in Mach4. When I ran the 3d toolpath with the F300, it does show a cmd of 300 and current of 300 when it running. Of course, the current value is constantly changing, but I can pick out values over 200.

This is something else that I am noticing. When doing long gradual slopes in Y, there is no issue with the Z axis stalling and the current will read 300IPM. There is one part of the toolpath where it is machining up the side of the part in z and only moves slightly in Y. This is the exact spot where the z-axis stalls out. It happens too fast for me to see what the current value is reading when this happens. See the image for the location I am referring to. I’m going to edit the toolpath in fusion to remove this section but it would be nice to know why it is doing that.

BTW, before the point that the z-axis stalls out, the tool is doing more of a radius arc, but at the point that it stalls, it is almost a vertical path.

What is your tolerance set to in the toolpath in fusion? I was getting a similar issue when I was using .0004 instead of the .001 with smoothing recommended by avid.

I agree with @greg.obj. Your machine is trying to go from horizontal at 300 ipm to vertical at 200 ipm and needs to know to slow down ahead of time. [Edit: looks like I misunderstood which direction it was moving.] There are acceleration limits, so if it doesn’t start early enough, it won’t be able to stay on the toolpath, and then it’s overconstrained and fails in some way. Enabling smoothing will allow Mach4 to look farther ahead and adjust earlier. If you’ve reduced your motor acceleration parameters, you can try setting them back to default values, if only to help with the diagnosis.

Here’s a video from Avid that discusses the topic.

1 Like

Well, prior to both of your replies, I did start messing around with the Mach4 acceleration setting. At AVID’s default setting of 30 for the Z axis, it would always stall the Z when on the steep vertical cuts. Dropping it down to 20 allowed me to finish without any stalling. Then I tried 25. It stalled, but not as severe. I wanted to get it as high as possible, but even 21 would stall the Z axis, but barely.

I ran the same toolpath with acceleration set to 20 four times, and not once did it stall.

Next, I tried putting it back to AVID’s default acceleration setting for the Z axis and set Fusion360 tolerance to .001". And, it still stalled the Z axis. I’m going to try and lower the acceleration again to see how high I can keep it with Fusion360 tolerance set to .001".

By the way, while my Z-axis is AVID’s, the spindle is CNC Depot’s S30. I’m unsure if the spindle adds any extra weight to the Z-axis, causing this problem. I don’t know the weight difference between the original AVID 4hp spindle and the CNC Depot’s S30.

1 Like

Disregard the second part of my last post. Setting the Fusion tolerance to .001 and turning on Smooth did fix the issue. With acceleration back to AVID default, it is working without any stalling of the z-axis. I think I forgot to open the new file so I was still running the old toolpath without didn’t changes.

Thanks Greg and Stephen!

1 Like

@Stephen solved this exact same issue for me just a month ago! Super easy fix.