Ok, here’s a tricky one…
I tried cutting 4 simple circular pockets and used jscut’s ramping feature (i.e. instead of straight plunging, it ramps into the required Z - or creates helical movements in my case of circular pockets, to optimize tool life). The outcome is ~9k lines of gcode, half of which involve Z moves.
In the end of running the gcode, I noticed that it went back to the given safe height of 3mm (Z WPos showing indeed 3), but it was actually about twice higher. Here’s my train of thought to debug this.
-
Wrong $102: This was my initial thought. However, a wrong $102 would only cause problems of scaling (i.e. if it was higher/lower, my Z moves would compress/expand proportionately). However, moving from Za to Zb and back to Za should go to the same Za, even if this is out of scale. In my case, Za shifts over time! Then I tried to manually give 30~40 Z moves and they were all consistent (and, btw, correct in scale too). Z0 would always go back and kiss the waistboard. So whatever happens, happens after 1000s of Z moves.
-
Probing issue: I am probing in different locations on the waistboard and when going G1 Z0 it is spot on. No probing/zeroing issues.
-
Skipped steps: This is the next area to question. However, no sign/sound of skipped steps. Furthermore, what makes me exclude this one is consistency. It would always shift the same. Even without load when “air cutting”.
-
Waistboard not level: Turns out also irrelevant. Even though I do plan to face mill the waistboard soon, I do my Z shifting comparison on the same X,Y (before running the gcode and in the end).
-
Tool slipping: That would be a possible explanation. If for some reason the tool did not engage in the collet tight enough, and the cut was too aggressive, then theoretically the tool could slip upwards and present exactly what I experience (this is a good visualization to imagine what is actually happening). However, this is out of question too… as, again, upwards Z shifting eventually occurs (by the same amount) when “air cutting” !
I am left with two areas (that I can think of) as possible culprits.
-
Buffering: If for some reason some gcode was taken out of stream, I would see Z shifts. However, the fact that I am cutting downwards and the shifting happens upwards, makes this less likely. Also, I am using bCNC which is supposed to be the (or at least one of the) best performers in streaming massive gcode.
EDIT: Hm… If downward Z moves were dropped at buffering, could the machine think it was lower than it was so that subsequent upward Z moves would make it shift further up? It is the consistency of this happening over and over in the same pattern that puzzles me. -
Rounding: This is the only one I have not debugged. I am using an ACME and therefore my $102 is ugly:
(200step/rev * 2microstep/step) / (25.4mm/in / 12rev/in) = 188.976microstep/mm
Which makes me wonder if 1000s of Z roundings are enough to cause Z shifting. One thing I thought to try today is to throw my $102 out of scale with a nice round number (say 200microstep/mm) and see if the same gcode still causes Z shifting.
Btw, I am using the X-Controller with GRBL version 1.0c.20151109 . I should probably open an issue over at @SungeunJeon’s github.
Any ideas, recommendations are very welcome.