Do I complete the bed mesh before/after M671in the "bed" file?
-
the M671 goes into the config.g not the bed.g
the bed mesh (G29) does not go into the bed.g at all it goes into your start g code of the slicer after the G28
-
-
@Veti said in Do I complete the bed mesh before/after M671in the "bed" file?:
the M671 goes into the config.g not the bed.g
Actually the M671 can go in the bed.g file.
The only real requirement is that it has been executed before bed.g is invoked.
Frederick
-
Hi,
My bed.g file does several related things.
- It homes the axes as needed
- It configures the Z probe
- It executes M671 to get things setup for auto leveling
- It probes the bed which results in the auto leveling being performed
- It sets the Z=0 datum which may have changed as a result of the auto leveling
The height map needed for Mesh Bed Compensation is created/loaded in other macro files that I invoke manually.
Now some folks create the height map at the beginning of every print and that is fine.
But all that probing takes some time and I have not found it necessary.
Frederick
-
Yes, M671 doesn't necessarily need to be in config.g but the order it's executed does matter.
The example I linked places it in config.g but it could also go at the start of bed.g if you wish.
I think it's wise to stick to the config.g holding the configuration commands and the other macros like bed.g containing actions that get executed, though they can also contain configuration modifications. It's all quite fluid, but the main point is that order of operations matters.
-
@Phaedrux said in Do I complete the bed mesh before/after M671in the "bed" file?:
It's all quite fluid, but the main point is that order of operations matters.You are, of course, as usual, correct.
Everyone has their preferences. Mine is to keep related things together - such as putting M671 into the bed.g file.
One benefit, to me, is that if something is not working as expected I likely only need to inspect one file to verify values.
Frederick
-
Do the G30 probing commands for the lead screw calibration go before or after the bed mesh compensation commands?
From the wiki example:
G28 ; home
M401 ; deploy Z probe (omit if using bltouch)
G30 P0 X20 Y190 Z-99999 ; probe near a leadscrew
G30 P1 X180 Y190 Z-99999 ; probe near a leadscrew
G30 P2 X100 Y10 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors
M402 ; retract probe (omit if using bltouch)Would i do this before the bed meshing?
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
Would i do this before the bed meshing?
Yes, you'd want to level out the bed before creating a heightmap of the bed surface.
-
Hi,
As @Phaedrux said level first then create the height map.
But remember to set the Z=0 datum (using G30) before creating or loading the height map
Frederick
-
@fcwilt are you referring to the z probe trigger height that is saved in the config.g file?
-
@Phaedrux when you say "level out the bed" i believe you are referring to a corexy type of printer in which the z axis motors are moving the print bed itself. Does it make any difference that my motors are attached to the x Gantry (ender 3 setup)?
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
@fcwilt are you referring to the z probe trigger height that is saved in the config.g file?
No.
A single G30 uses the Z probe to set the current Z position value such that Z=0 with be at the desired height, such as the nozzle just touching the bed.
https://duet3d.dozuki.com/Wiki/Gcode#Section_G30_Single_Z_Probe
Frederick
-
@fcwilt ah ok. I'll make sure its added to my bed.g file.
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
@Phaedrux when you say "level out the bed" i believe you are referring to a corexy type of printer in which the z axis motors are moving the print bed itself. Does it make any difference that my motors are attached to the x Gantry (ender 3 setup)?
Unless you have modified your Ender such that there are multiple steppers that can level the bed you cannot use Auto Bed Leveling (ABL).
ABL probes the bed to determine how out of level it may be and makes adjustments, using the multiple steppers, to make the bed level.
If your bed has adjustments you can make by hand, such as turning thumbscrews, you can use the Manual Bed Leveling Assistant (MBLA).
This probes the bed in much the same way the ABL does but the result is instructions on how to turn the thumbscrews to level the bed.
Frederick
-
@fcwilt I have modified my printer with an EZ ABL Pro and dual Z axis steppers in addition to linear rails, mosquito hotend, bmg extruder, and a silicone heatbed.
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
@fcwilt I have modified my printer with an EZ ABL Pro and dual Z axis steppers in addition to linear rails.
Well it looks like the EZ ABL Pro is just a inductive Z probe - which is fine.
But I don't think that dual Z axis steppers on a bed slinger like the Ender 3 is going to allow you to level the bed.
Unless I am completely misunderstanding how your printer is setup. Can you post a picture?
Frederick
-
@fcwilt this isn't my printer but it is how my z steppers are setup. Perhaps it would be better to run these motors in series? My goal was to make sure my x gantry was square with the frame. Or if possible, is there a stall detection option similar to the prusa at the top of the z axis?
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
@fcwilt this isn't my printer but it is how my z steppers are setup. Perhaps it would be better to run these motors in series? My goal was to make sure my x gantry was square with the frame. Or if possible, is there a stall detection option similar to the prusa at the top of the z axis?
Thanks.
To square the gantry to the frame would require someway to "probe" the relationship of the gantry to the frame.
Probing the bed would only work if the bed was absolutely square with the frame.
What you could do would be to mount an end stop sensor of some sort on each Z axis. The current v3 firmware allows for this and will adjust the gantry based on the position of the end stop sensors. So if you took the time to carefully position them you could use the firmware to square the gantry when homing it.
BTW does the bed have manual adjustment screws for leveling?
Frederick
-
@fcwilt I understand, I'll order some endstops for the top of the z axis. What would be the Gcode commands for this?
-
@mmartin said in Do I complete the bed mesh before/after M671in the "bed" file?:
@fcwilt I understand, I'll order some endstops for the top of the z axis. What would be the Gcode commands for this?
Well for my printer with three Z steppers I have this which specifies which outputs are being used for the Z steppers
M584 X0 Y1:2 Z5:6:7 E3;
Then I have this which specifies which inputs are used for the Z end stop sensors and the other bits of information needed
M574 Z1 S1 P"!duex.e2stop + !duex.e3stop + !duex.e4stop" ; configure active-high endstop for low end
Once you have that then simply homing Z would take care of moving the gantry toward the end stop sensors and adjusting the Z steppers as needed so that both end stop sensors had been triggered at the same time.
The commands would be typical homing commands. The following assumes you are homing to Z min rather than Z max.
G91 ; relative moves G1 H1 Z-999 F600 ; move down "fast" until the end stop sensors are triggered G1 Z20 ; move up so the end stop sensors are no longer triggered G1 H1 Z-999 F150 ; move down "slow" until the end stop sensors are triggered
If I can find my camera I will make a short video showing the "leveling" in action.
Frederick