Moving "beyond" the limit switch
-
Hey,
I am homing my axes with a hall sensor which triggers about 10mm away from the sensor which is also the problem. I need the few extra mm and would like to park the print head a bit closer to the sensor.
I want to home the axis and then move ~5mm further than the defined axis limit and then define this as new axis limit. Is that possible?
What would I need to add/change?
G91 G1 H1 X999 F8000 ; Rough homing G1 X-10 F8000 ; Move back a few mm G1 H1 X999 F400 ; Precision homing G1 X5 ; Move into final parking position (beyond the limit switch)
-
The axis limits are set by M208, so if your endstop triggers 10mm away from the actual limit of travel you can set the M208 limit to be negative or positive to adjust the actual range of motion. Does that make sense?
Can you post your config.g and homing files so I can make a more specific recommendation?
-
I've set the center of the bed as origin (0,0), so my axes limits are defined like this in the config file:
M208 X200 Y200 Z200 U200 S0 ; set axis maxima M208 X-200 Y-200 Z0 U-200 S1 ; set axis minima
I think I've found the solution, though it's not very "clean" as I would prefer to have these kind of settings in my config and not my homing file:
; Homing X G91 M208 X200 Y200 Z200 U200 S0 ; set the original X axis maxima G1 H1 X999 F8000 ; Rough homing G1 X-10 F8000 ; Move back a few mm G1 H1 X999 F400 ; Precision homing M208 X205 Y200 Z200 U200 S0 ; set the extended X axis maxima G1 X5 F400; Move into final parking position
If I now calibrate the axis limits (e.g. for an IDEX printer), I have to change the limits in multiple homing files which is not very practical.
I wonder if there's a more practical solution?
-
@techni said in Moving "beyond" the limit switch:
I wonder if there's a more practical solution?
You can also use G92 to force the current position as whatever you need it to be.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_G92_Set_Position
-
@techni
You already have the trigger position from your G1 H1 move.
*EDIT: As @fcwilt pointed out below, G1 H1 would set the current position per M208
You'd have to use G1 H3 to set M208 to the trigger position then do the addition
This would require an end stop on the minima as well or you would not have a valid reference *
You can use that to calculate the M208 parameters.
You could also easily extend that so that the extra amount is set in config.g by using global variables.Config.g
M208 X200 Y200 Z200 U200 S0 ; set the original X axis maxima global XparkValue = 5 global YparkValue = 5
.in your home file
M208 X{move.axes[0].machinePosition + global.XparkValue} S0 ; set the extended X axis maxima
I'd leave out any axis I wasn't setting from the home file to avoid resetting an axis you've already modified
-
@techni said in Moving "beyond" the limit switch:
I wonder if there's a more practical solution?
G92 can be used for such a situation.
As you have found the G1 H1 move sets the position to the min/max of the axis as set in M208.
And those min/max values may have no relation to the position of the endstop sensor.
For example on a printer I am currently working on the Z range is from 0 to 200 but the Z endstop sensor triggers at Z = 12.30.
So here is the essential parts of homez.g:
G91 G1 H1 Z-300 F900 G1 Z10 G1 H1 Z-15 F300 G90 G92 Z12.30 ; this is the important part - it tells the firmware that Z is not at Zmin but at Z=12.30
-