Hooked up z-probe, but bed still not perfectly level
-
I'm running RRF on a Due\RADDS setup on a custom bot: Recently installed a LJ12A3-4-Z/BY inductive proximity sensor on it. Leveling is better than without it. But, it's still not level. I did a before\after comparison with a box the size of my build volume: Before probe, the back-right corner was too high, nearly causing extrusion to stop.
Now, the back right corner looks 'correct', while the rest of my bed is now 'too low', so things aren't sticking right. Basically, it's like it just adjusted the whole bed slightly down, but didn't do any sort of actual transformation to it based on it not being perpendicular with the nozzle using the 5 point sample space.Here's my code if it'll help anyone notice if anything is amiss. I measured the distance of my probe from nozzle with calipers: X49, Y52 (it's behind and to the right, my bed zero is front left), and did the whole calibration sequence to determine the probe height offset from nozzle.
config.g:
; Z Probe
M558 P4 X0 Y0 Z1 ; Set probe type + which axes should use the probe.
G31 X49 Y52 Z.5 P500 ; Set the XY probe offset from toolhead, + Z height and trigger threshold (put your own values here)bed.g
M561 ; Clear any bed transform, otherwise homing may be at the wrong height
G28 ; home the printer
G30 P0 X49 Y52 Z-99999 ; Four… - Front Left
G30 P1 X49 Y305 Z-99999 ; ...probe points... - Back Left
G30 P2 X299 Y305 Z-99999 ; ...for bed... - Back Right
G30 P3 X299 Y52 Z-99999 ; ...leveling - Front Right
G30 P4 X149 Y152 Z-99999 S5 ; 5th probe point + store the leveling - Center
G1 X0 Y0I had to embed those offsets into al the G30 commands, or it'd try and drive the toolhead off the buildplate.
Any thoughts are appreciated! -
Hey Eric, fancy meeting you here.
Here's my gcode section for doing bed compensation. Should be close to what you need, though you should double check on any features in dc42 RRF vs RADDs RRF.
I'm not sure on the value of calculating the z plane via single probes vs using G32 and doing them all at once. So if there is a specific reason you use G30 vs G32, I'd be curious to know.
Below sets up the relavent bits for doing the probe. Issuing a G32 actually kicks the probe off and does the compensation math and stores it in memory.
; Z probe
M558 P5 X0 Y0 Z1 T4000 F300 H10 ; Analog Z probe, also used for homing the Z axis
G31 Z0.0 P500 ; Set the probe height and threshold (put your own values here)
; The following M557 commands are not needed if you are using a bed.g file to perform bed compensation
;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of the Z probe
M557 P0 X45 Y17 ; Four…
M557 P1 X45 Y291 ; ...probe points...
M557 P2 X319 Y291 ; ...for bed...
M557 P3 X319 Y17 ; ...levelling
;M557 P4 X141 Y82.5 ; 5th probe point for levellingAs for calculating offset of Z probe to nozzle height. I set my z probe offset to 0, then do a G28. Then a G92 Z0 to reset Z position to 0, then jog the z platform as needed to get correct initial height. Once that's done, then use the value of Z for the probe offset, be sure to invert the sign of Z position for offset.
-
Hey Chris!
Why use G30 vs M557? From what I understand:
G32 executes bed.g, and bed.g is where you put the G30.
You could optionally use M557 in config.g, which is what it looks like you'er doing. I just liked the idea of having a separate bed.g for the level stuff, but I suppose I could use M557 in config.g instead as a test and see if that offers different behavior. Thanks for the info.That's really the only issue I've had: I've done a fine job getting the Z-offset specified, per something similar to what you've described.
I'll post back up if I notice any different behavior with M557.
-
Well, that worked: Switching from G30's in bed.g to M557 in config.g mades it nice and super flat now. Reading the docs it seemed like they did the same thing ,when you passed the S parameter to the final G30… but... I guess something is different.
Thanks Chris! -
You're welcome. The credit really should go to the folks who setup the original configs, I just modified them and tried to understand what they were doing vs the G28 I used in Marlin.
I'd be curious to know why bed.g wasn't working for you. If you figure that out, throw it up on your blog, I still refer back to that from time, like today actually.
-
To follow up from another post: In fact bed.g with G30's in it, or config.g with M557's behave the exact same: I had a bug where I was crazy under-extruding, that I fixed at the same time I switched from bed.g to the M557 test. Switching back to bed.g with the correct extrusion steps now has the exact same behavior as the M557's in config.g. I like the separate bed.g macro, so I think I'll stick with that. But thanks for the help troubleshooting!