Help Understanding M671 Z-Manual Adjustment
-
I upgraded to 1.19 last night, and started playing with the M671 feature, in hopes of making leveling easier on myself. However, I seem to have gotten lost along the way, and hope those wiser than I can explain things.
I have a CoreXY with a 300x300mm 8mm thick aluminum bed, with 4x interface/leveling holes (yes, I know, 4 points is bad. I didn't know better at the time). My Z is driven by 2x leadscrews belted to be driven by a single stepper. I'm using a DC42 IR probe at current for Z probing.
In my config.g, I added in M671 X25:25:275:275 Y75:225:225:75 S1.0 P0.5 ; Define bed screw locations with maximum correction and thread pitch.
(I know that the S1.0 and P.05 are the defaults, and technically not needed, but figured having them there wouldn't hurt, and would remind me they are needed if anything shifts from the defaults). Since I have only a single Z motor, I do not have an M584 defined.I configured my Bed.G file with:
[c]G28
G30 P0 X25 Y80 Z-99999
G30 P1 X25 Y280 Z-99999
G30 P2 X275 Y280 Z-99999
G30 P3 X275 Y80 Z-99999
G30 P4 X150 Y150 Z-99999 S4
[/c]The probing locations (from memory ATM), were chosen to be very close to the bed level screws, but not directly on top, as they are black, and have a different IR response than my bed itself. The final probe point at bed center is because it was previously there (pre 1.19), and I couldn't think of a good reason to remove it.
Executing a G32 runs the Bed.G, and then brings up the height map as I'm used to, and displays offset values for each of the probed points. However, it does not offer any sort of feedback (as far as I can tell) about the number of turns needed for height correction.
So, that brings me to the question part of this narrative-is the printout of turns per screw adjustment not fully baked in yet? If not, where is it hiding that I'm missing it?
On the height map, and the G32 results in the console-are the reported Z values for the bed equation the adjustment to be applied, or the height of the probed point? If it is the height, and not the calculated adjustment needed (in mm), where is the adjustment needed reported out?
Thanks! -
I've just tested a similar setup and it's working for me, I get this on the GCode Console and not height map:
[[language]] Manual corrections required: 0.14 turn up (-0.07mm) 0.44 turn up (-0.22mm) 0.42 turn up (-0.21mm) 0.14 turn up (-0.07mm)
Please do the following:
- Run M115 and check you are running the real 1.19 release, not a beta or a release candidate
- Run M671 with no parameters and check that it reports the screw coordinates as you specified them on config.g.
-
Thank you David! I am running 1.19, but it turns out I had a space in the M671 string which broke it. It's fixed now it looks.
For those of you wondering what "correct," looks like, if you have M671 configured properly, you'll get something that looks about like this in your G-code console after running G32. It may help for sanity sake to run M671 without parameters to remember what screw is what when looking at the G32 correction results.
G32
Manual corrections required: 0.07 turn up (-0.04mm) 0.63 turn down (0.31mm) 0.65 turn down (0.32mm) 0.10 turn up (-0.05mm) -
One question, and this may be a browser thing…after I successfully run the G32 with M671 properly working now, it won't pull up the height map like it used to, and the option to show probed points remains grayed out.
-
Adding on to this-I run G32, and get the direct corrections. I apply them (or as close to as I can by hand…sort of hard to dial precisely 0.41 of a turn). Rerun G32, and the results say to apply basically the same correction again. I know 4-point math is wonky, and I'm not discounting I'm doing something wrong.
As an example:
8:48:18 PMManual corrections required: 0.44 turn up (-0.22mm) 0.36 turn up (-0.18mm) 0.41 turn up (-0.20mm) 0.53 turn up (-0.27mm)
8:46:47 PMManual corrections required: 0.46 turn up (-0.23mm) 0.40 turn up (-0.20mm) 0.45 turn up (-0.22mm) 0.55 turn up (-0.28mm) -
One question, and this may be a browser thing…after I successfully run the G32 with M671 properly working now, it won't pull up the height map like it used to, and the option to show probed points remains grayed out.
To get the height map I suggest you use mesh bed compensation (G29).
-
Adding on to this-I run G32, and get the direct corrections. I apply them (or as close to as I can by hand…sort of hard to dial precisely 0.41 of a turn). Rerun G32, and the results say to apply basically the same correction again. I know 4-point math is wonky, and I'm not discounting I'm doing something wrong.
As an example:
8:48:18 PMManual corrections required: 0.44 turn up (-0.22mm) 0.36 turn up (-0.18mm) 0.41 turn up (-0.20mm) 0.53 turn up (-0.27mm)
8:46:47 PMManual corrections required: 0.46 turn up (-0.23mm) 0.40 turn up (-0.20mm) 0.45 turn up (-0.22mm) 0.55 turn up (-0.28mm)Overall, what you have is a height error of about 0.45mm between this set of bed probing and Z homing. This probably means that you are Z homing in the centre of the bed, but either the bed is dome-shaped or (more likely) the X carriage is sagging in the middle of its travel. If we subtract the first value (which is closest to the average) in each correction from the other 3 we get:
1st run: 0 +0.03mm +0.01mm -0.05mm
2nd run: 0 +0.04mm +0.02mm -0.05mmMaybe I should change the code to leave one of the screws alone.
It's possible that the calculation could be wrong because I haven't had any feedback on the 4-screw case before, just my own simulation of it. Try duplicating the block of G30 commands in bed.g, but in the first block change S4 on the final G30 command to S-1. That will print out the probe height errors the first time, then the manual corrections the second time. From that we should be able to check that the corrections look sensible.
-
I think altering the calculation code to leave one screw alone may be well advised, if for nothing more than to have one less point for an end user to over/undershoot and further skew things.
I'll rerun this all here in a bit when I go home for lunch, and post up my homeall.g, bed.g (with your suggested tweak), and M671 line.
-
[bed.g] G30 P0 X15 Y75 H0 Z-99999 G30 P1 X15 Y225 H0 Z-99999 G30 P2 X290 Y225 H0 Z-99999 G30 P3 X290 Y75 H0 Z-99999 G30 P4 X150 Y150 H0 Z-99999 S-1 ; done to check calculations at DC42's request. G30 P0 X15 Y75 H0 Z-99999 G30 P1 X15 Y225 H0 Z-99999 G30 P2 X290 Y225 H0 Z-99999 G30 P3 X290 Y75 H0 Z-99999 G30 P4 X150 Y150 H0 Z-99999 S4
[homeall.g] ; Relative positioning G91 ; Lift Z G1 Z5 F6000 ; Move quickly to X axis endstop and stop there (first pass) G1 X305 F1800 S1 ; Go back a few mm G91 G1 X-5 F6000 G90 ; Move slowly to X axis endstop once more (second pass) G1 X305 F360 S1 ; Move quickly to Y axis endstop and stop there (first pass) G1 Y305 F1800 S1 ; Go back a few mm G91 G1 Y-5 F6000 G90 ; Move slowly to X axis endstop once more (second pass) G1 Y305 F360 S1 ; Absolute positioning G90 ; Go to near front and home Z G1 X30 Y30 F6000; (150,180.5 for probe at dead center) G30
[c]M671 X10:10:295:295 Y75:225:225:75 S1.0 P0.5[/c]
-
[G32 Results] 11:47:48AM Bed probe heights: -0.213 -0.219 0.461 1.087 0.323, mean 0.288, deviation from mean 0.485 Manual corrections required: 0.51 turn up (-0.25mm) 0.43 turn up (-0.21mm) 0.48 turn up (-0.24mm) 0.61 turn up (-0.30mm) 11:47:24AM G32 Bed probe heights: -0.213 -0.219 0.461 1.087 0.323, mean 0.288, deviation from mean 0.485
-
Playing with this more, I really do think that the computation for manual adjustment needs to be three screws only.
-
It's already on my list to change for the next release.