Dual Z motors and compensation programing questions
-
@fcwilt Okay, I will update my bed.g, do I need to add anything to the other home files? I am just not sure what uses the bed.g file/ what calls for it.
-
@Tpmoses said in Dual Z motors and compensation programing questions:
@fcwilt Okay, I will update my bed.g, do I need to add anything to the other home files? I am just not sure what uses the bed.g file/ what calls for it.
The homing files should not affect this process in any way.
The bed.g file is invoked by the command G32 which is the command used for both manual and automatic bed leveling.
Here is the DWC pull-down menu showing the item True Bed Leveling (G32).
Selecting that item will run bed.g so bed.g must have the commands needed to perform bed leveling.
Frederick
-
@fcwilt Okay, I updated my bed.g. It runs the program, and it probes at both leadscrews. The only Issue I can ee now is that it doesn't adjust the z motor to make the gantry level now. any suggestions?
T
-
When I run G32 I get this in the console
G32
Error: Some computed corrections exceed configured limit of 1.00mm: -0.669 -2.140 -
@Tpmoses said in Dual Z motors and compensation programing questions:
@fcwilt Okay, I updated my bed.g. It runs the program, and it probes at both leadscrews. The only Issue I can ee now is that it doesn't adjust the z motor to make the gantry level now. any suggestions?
T
Hi,
Post your updated bed.g file and let's see what it looks like.
About the message: increase the S parameter in the M671 command.
Frederick
-
Here is my new Bed.g,
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Fri Jan 22 2021 11:13:01 GMT-0600 (Central Standard Time) M561 ; clear any bed transform G28 ; home G30 P0 X0 Y450 Z-99999 ; probe near a leadscrew, half way along Y axis G30 P1 X1170 Y450 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
The M671 command is in my config.g like the guide had said, however I didn't have an S value there. I will add that and see what it does.
-
As well as the probe offset is in config.g
-
@Tpmoses said in Dual Z motors and compensation programing questions:
The M671 command is in my config.g like the guide had said, however I didn't have an S value there. I will add that and see what it does.
I don't know why that command is put into config.g.
It's part of bed leveling so I put it into bed.g along with all the other bed leveling commands so I can see at a glance all relevant values.
Also there is no G30 in the bed.g file so you should add this to your bed.g file.
; set the Z=0 datum which may have changed due to bed leveling ; -- step 1 - move probe to center of bed G1 X{-sensors.probes[0].offsets[0]}, Y{-sensors.probes[0].offsets[1]}, F6000 ; -- step 2 - do single probe which sets Z to trigger height of Z probe G30```
-
It looks like the S value in the M671 was the issue. I didn't have it specified, so it defaulted too small. I'm not sure why it is in config.g, that is just where the guide i was using Bed levelling using multiple independent Z motors said to put it.
I will add that secondary homing to bed.g and go from there. Thank you for your help!
Thanks,
T -
@Tpmoses said in Dual Z motors and compensation programing questions:
I'm not sure why it is in config.g, that is just where the guide i was using [Bed levelling using multiple independent Z motors]>
Several things get tossed into config.g that I just happen to think belong elsewhere, like M671. It is part of bed leveling so why not put it into bed.g along with all the other bed leveling commands.
It's not that having them in config.g is wrong, they will work there just fine, it's just not the way my mind works.
I will add that secondary homing to bed.g and go from there. Thank you for your help!
The commands I mentioned to add to bed.g are not homing commands, they are commands to set the Z=0 datum.
Bed leveling can change that value so it is safest to reset it so it is correct after bed.g is complete.
Setting the Z=0 datum needs to be done at other times so not being in bed.g doesn't mean things won't work but why not set it there just to be safe.
Frederick
-
@Tpmoses just to contradict @fcwilt here... I just run homeZ (G28 Z) at the end of my bed.g. in my case my homeZ just uses a z probe at a set point, so it means I can make sure I always probe the same point to reset the Z datum. If you use an endstop in your homeZ (e.g. in a delta printer), then this won't work and you'll have to use fcwilt's method (or something similar).
-
@engikeneer said in Dual Z motors and compensation programing questions:
@Tpmoses just to contradict @fcwilt here... I just run homeZ (G28 Z) at the end of my bed.g. in my case my homeZ just uses a z probe at a set point, so it means I can make sure I always probe the same point to reset the Z datum. If you use an endstop in your homeZ (e.g. in a delta printer), then this won't work and you'll have to use fcwilt's method (or something similar).
Good point.
While I have a Z probe I also always install a Z end stop sensor, one per Z stepper.
The normal probing speed for one of my probes is 300 or less - depending on type of probe.
Homing using the end stop sensors is much quicker since the normal homing speed is 1200 or more.
My apologies for failing to mention this.
I should also point out that the formula I posted for probing the center of the bed...
G1 X{0 - sensors.probes[0].offsets[0]}, Y{0 - sensors.probes[0].offsets[1]}, F6000
...is based on my printers co-ordinates for bed center - which are X=0 and Y=0
The formula will work regardless if you change each 0 before the minus sign to the correct value for your bed center.
I only showed the formula there by way of demonstration. I don't actually do that but wanted to keep things simple. I actually have a macro that I call to set the Z=0 datum as needed and it does use the formula. But since I always call the macro I always use the same XY co-ordinates.
Again my apologies - I keep forgetting that not everyone uses 0,0 as bed center.
Thanks.
Frederick