Correct Configuration for Z Min Stop and Z Probe
-
I don't understand your homeall.g file.
- You call macros to home V, Y, Z, U but you code the homing of X.
- You have G29 S0 - why is that there?
- What are axis V and U used for?
I call macros in my homeall.g file - in fact I have nothing but macro calls so I don't duplicate any code that is already in homex.g, homey.g, homez.g, etc.
If you have a Z min endstop the simplest approach is to home Z first. Then you don't have to have the various G1 H2 Z# commands to raise/lower Z when homing X, Y, etc.
I don't understand your bed.g file.
- Are you trying to do Manual or Automatic Bed Leveling (auto requires multiple Z steppers)?
- What type of Z probe are you using?
Once we have those answers we can move forward.
Frederick
-
@fcwilt Yes I have some additional functions the machine performs that aren't exactly cartesian based after the machine finishes printing. V axis is far away from the "printer assembly" portion of the machine so I would say ignore that and U actually controls the angle of Y-axis relative to X in the XY plane. Between these things, the movements in my homeall file are indeed odd but other than probing and my Z, everything is doing what I want it to be doing in homeall.g
I used to call all macros in my home but now I have to do these odd movements. Z has to home twice for again, what would be difficult reasons to explain in a post.
I'm trying to do ABL but with a BL Touch. Z min is just a microswitch.
-
Anytime you create or load a height map you need to first set the Z=0 Datum which is easily done by moving the Z probe to the center of the bed and then doing a G30.
If the Z probe settings in G31 are correct then the Z=0 position of the printer will be correctly set.
Then you can create or load a height map and all should be fine.
When do you execute the G32 needed to run the bed.g file?
Since you are using a BLTouch you do not need the M401/M402 commands in the bed.g file as the firmware handles that automatically.
Since you are doing Automatic Bed Leveling you need to be sure the Z=0 Datum is set, at some point, after the leveling is complete. To keep things simple I do it at the end of the bed.g just to be sure it is done.
Also your bed.g file is only doing one pass at leveling the bed. This may not be enough.
Here is how I do it which will run up to 5 leveling passes - which have always been enough for my printer - usually one or two do the job. Of course, the G30 commands need to use values suitable for your printer.
This is from my bed.g file:
while true ; run leveling pass ; --- probe near bed corners --- G30 P0 X-140 Y-90 Z-99999 ; LF G30 P1 X-140 Y90 Z-99999 ; LR G30 P2 X140 Y90 Z-99999 ; RR G30 P2 X140 Y-90 Z-99999 S4 ; RF ; check results - exit loop if results are good if move.calibration.initial.deviation < 0.02 break ; check pass limit - abort if pass limit reached if iterations = 5 M291 P"Bed Leveling Aborted" R"Pass Limit Reached" abort "Bed Leveling Aborted - Pass Limit Reached" ; --- finish up --- ; --- set Z=0 datum which can be affected by leveling --- M98 P"center_probe.g" ; position for probing G30 ; do single probe which sets Z to trigger height of Z probe
-
This post is deleted! -
@fcwilt Oh I thought Z=0 datum was done before ABL so that it knows how high off to come to probe in the first place. I think thats part of my problem too then. I'll make sure to remove the M401/M402 command as well.
G31 commands are correct and Z height for it was determined using the "Checking the Trigger Height" Section
So you don't use mesh.g at all either? Either way that is a helpful outline. So in your case is the only time the Z-Min end-stop used is in homing z?
-
@jrcl said in Correct Configuration for Z Min Stop and Z Probe:
@fcwilt Oh I thought Z=0 datum was done before ABL so that it knows how high off to come to probe in the first place. I think thats part of my problem too then. I'll make sure to remove the M401/M402 command as well.
G31 commands are correct and Z height for it was determined using the "Checking the Trigger Height" Section
So you don't use mesh.g at all either? Either way that is a helpful outline. So in your case is the only time the Z-Min end-stop used is in homing z?
I do use mesh.g. One thing I do that is different is to keep like things together. So in my mesh.g file I have all the commands that are needed to create a height map, including commands like the M557 that are commonly put in config.g
I use a Z min endstop for Z homing on all my printers. It allows homing of Z first and getting it clear of the bed so you can home X and Y without the G1 H2 moves typically used to lift/drop Z for clearance when homing X and Y.
Frederick
-
This post is deleted! -
@fcwilt I'm so stupid. I constantly call Mesh Compensation, ABL in my head, and I did it again on here, arg! I am manually leveling with Z min and then just using BL Touch to probe.
My bed.g now looks like this, I moved M557 here so I wouldn't have to reset my board when I'm playing around with those values. I'm still running high when the print starts. I just run homeall.g then bed.g to start my actual print gcode file. However I'm still running high, maybe I need to run through the MBLA again? or redo checking my trigger height.
;bed.g G1 X135 Y118 Z12 ; position in center of bead for probing G30 ; do single probe which sets Z to trigger height of Z probe M557 X5:150 Y10:150 P3 ; define probing grid G29 S0 ; enable mesh compensation
-
@jrcl said in Correct Configuration for Z Min Stop and Z Probe:
@fcwilt I'm so stupid. I constantly call Mesh Compensation, ABL in my head, and I did it again on here, arg! I am manually leveling with Z min and then just using BL Touch to probe.
My bed.g now looks like this, I moved M557 here so I wouldn't have to reset my board when I'm playing around with those values. I'm still running high when the print starts. I just run homeall.g then bed.g to start my actual print gcode file. However I'm still running high, maybe I need to run through the MBLA again? or redo checking my trigger height.
;bed.g G1 X135 Y118 Z12 ; position in center of bead for probing G30 ; do single probe which sets Z to trigger height of Z probe M557 X5:150 Y10:150 P3 ; define probing grid G29 S0 ; enable mesh compensation
Let's see if we can clear things up.
Mesh Bed Compensation is the feature that uses a height map to adjust the Z position during printing to try and compensate for bed irregularities.
The suggested place to create the needed height map is in mesh.g.
The code above from bed.g should work fine but let's move it into mesh.g which is the best place for it.
You have a G32 somewhere which is invoking bed.g - just change that to G29 and it will invoke mesh.g - and everything will be in sync.
You have specified in the M557 a 3 x 3 grid which is only 9 points. Now if your bed is nice and regular that may work fine. I have beds which are rather "bumpy" and need grids of 200 to 400 points.
If you want to find out how "bumpy" your bed is just create a height map with 400 points and look at in the DWC height map viewer. It will take sometime to create a 400 point height map so be patient. After viewing the height map you can decided just how many points you need for good results and use appropriate values in your mesh.g file.
Since I need a large number of points I create my height map using a macro I invoke manually from the DWC. I then use this height map for all subsequent printings. From time to time I create the height map again just to be safe.
Frederick
-
@fcwilt Swapped that all to mesh.g and called G29 instead. Redid, MBLA, Z Trigger height, and ran a 100 point to start. Definitely yield improved results and is functioning correctly. Just some fine-tuning and I think I will eventually implement something like a 400-point height map once more things on the machine are finalized. Thanks for the help as always! Your explanations are always a nice balance of basic enough to fully understand but not patronizingly so
-
-
Always glad to be of help when I can. I remember starting out with my first 3D printer and having to climb the learning curve. Pretty soon it will all be second nature to you.
Frederick