Printhead offsets
-
Hi all,
I'd like to set up the XYZ offsets of my custom printhead. What's the best way to do it?
I've red G31 and G10 in config.g can be used to set the offsets? I've also seen M206 somewhere but not sure about that one... How would you do it?Thanks!
-
Offsets with respect to what?
M206 is deprecated, so you can ignore it.
G31 is going to set the probe offsets, whereas G10 sets tool offsets or coordinate systems offsets.
Frederick
-
Right now, when probing, the carriage goes in the center which is perfect during homing.
However my nozzle isn't at the same location and is offset by a few cm in each of XY directions.So I'd like to set it up to make sure it is probing in the center but when printing, it takes the nozzle as the HRP.
In this case should I use G31? I gave it a try a now the nozzle goes at the center while probing. Is it normal?
Thank you!
-
With a single tool machine you would typically have zero tools offsets (G10) and the probe would be specified as being offset (G31) with respect to the tool.
I hope I don't confuse you but I will show you how I do things.
I make use of a lot of different routines because I have found I was doing the same thing in several places, so by put that code in a routine I would call the routine.
Don't worry about the details of the first two M98 calls, the routine names should suggest what is being done.
This routine does what it's name says - it moves the probe to the center of the bed, regardless of the current probe offsets, because it uses the current offset values to compute where the center of the bed.
There are two versions - one is just a little shorter but you can always use the longer one in all cases
; ============================= ; === probe_to_center.g BOF === ; ============================= M98 P"check_homed.g" W"probe_to_center.g" X{null} Y{null} Z{null} M98 P"move_to_z_home.g" ; calls set_z_home.g ; --- short form when center of bed is X=0 Y=0 --- var xpos = 0 - sensors.probes[0].offsets[0] var ypos = 0 - sensors.probes[0].offsets[1] ; --- Long form when center of bed is X != 0 and Y != 0 --- ;var xpos = ((move.axes[0].max + move.axes[0].min) / 2) - sensors.probes[0].offsets[0] ;var ypos = ((move.axes[1].max + move.axes[1].min) / 2) - sensors.probes[0].offsets[1] ; --- move probe to center of bed --- G90 ; absolute moves G1 X{var.xpos} Y{var.ypos} F99999 ; move to center of bed at max possible speed ; ============================= ; === probe_to_center.g EOF === ; =============================
-
Now to risk really confusing you.
Here is my routine for setting the Z=0 datum - and as I warned you I make use of a lot of different routines that encapsulate commonly used chunks of code.
; ========================= ; === probe_set_z.g BOF === ; ========================= M98 P"check_homed.g" W"probe_set_z.g" X{null} Y{null} Z{null} M291 R"Setting Z=0 Datum" P"Please wait..." S0 M98 P"probe_config.g" ; insure probe is configured M98 P"cancel_mesh_bsteps.g" ; cancel any mesh compensation and zero the baby steps setting M98 P"move_to_z_home.g" ; position at Z home for probing M98 P"probe_to_center.g" ; move probe to bed center G30 ; do single probe - sets Z to probe trigger height M98 P"move_to_z_home.g" ; return to Z home M98 P"tool_to_center.g" ; move tool to back to bed center M291 R"Z=0 Datum has been set" P"OK" T3 ; ========================= ; === probe_set_z.g EOF === ; =========================
Don't worry if it makes little sense - if you wish I can explain it all in detail.
Just don't get over whelmed by my approach - I've been doing this work for several years.
Frederick