Stall based X,Y homing works only once
-
This is for a CoreXY with working endstop based X,Y homing which I try to convert to stall based homing. Homing is at max X,Y. Configuration is from the RepRap configurator and the firmware version is 2.03beta2 (2019-02-16b1) but the non beta version had the same problem.
When I power on the printer I can successfully home X once (using the LCD) or I can home Y once, but after that, any other attempt to home X or Y just jerks the head a little. For example, if I power on and home X (successfully) and then try to home Y it jerks, and vice versa.
It seems that the first stall based homing leaves the system in some bad state. Any suggestion what the problem is?
Thanks.
config.g
M574 X2 Y2 S3 ; Set endstops controlled by motor load detection
NOTE: I commented the second pass of X, Y homing since it's the second stall attempt and thus jerks.
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 17 2019 09:38:13 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 X300 F3600 ; move quickly to X axis endstop and stop there (first pass) ;G1 X-5 F6000 ; go back a few mm ;G1 S1 X300 F360 ; move slowly to X axis endstop once more (second pass) G1 Z-5 F6000 S2 ; lower Z again G90
; homey.g ; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v2 on Sun Mar 17 2019 09:38:13 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 Z5 F6000 S2 ; lift Z relative to current position G1 S1 Y312 F3600 ; move quickly to Y axis endstop and stop there (first pass) ;G1 Y-5 F6000 ; go back a few mm ;1 S1 Y312 F360 ; move slowly to Y axis endstop once more (second pass) G1 Z-5 F6000 S2 ; lower Z again G90 ; absolute positioning
-
don't try to home at very low speed as stall detection won't work well. Since homing x or y will mark both axes as homed (both motors move), it is easier to create a macro and home both axes from within that macro.
Call the same macro from homex.g and homey.g withM98
.
Here is my macro for reference (I home to axis minima):M400 ; make sure everything has stopped before we make changes M913 X65 Y65 ; XY motors to 65% current M915 H400 X Y S1 R0 F0 ; set X and Y to sensitivity 0, do nothing when stall, unfiltered M574 X1 Y1 S3 ; set endstops to use motor stall G91 ; use relative positioning G1 Z10 F1200 ; lift Z G1 S1 X-325 F2400 ; move right/back 325mm, stopping at the endstop G4 P500 ; wait 500msec G1 X5 ; move away from home G4 P500 ; wait 500msec M400 ; make sure everything has stopped before we make changes ; X is homed at this point, now home the other axis G1 S1 Y-325 F2400 ; move beyond axis minimum G4 P500 ; wait 500msec G1 Y5 ; move away from home G1 Z-10 F1200 ; lower Z M400 ; make sure everything has stopped M913 X100 Y100 ; XY motors tp o 100% current G90 ; back to absolute positioning M574 X1 Y1 S1 ; define active low microswitches
; homex.g ; called to home the X axis M98 P"/macros/Sensorless homing"
; homey.g ; called to home the Y axis ; not really needed since we are corexy and y will be homed with homex procedure M98 P"/macros/Sensorless homing"
-
Have you seen this? https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
Sensorless homing on a CoreXY is a bit tricky due to both motors moving. As soon as one stalls it stops both. It's also highly dependent on the motors used and their temperatures.
-
After homing X, try moving X back 1mm or more before you home Y. Same after homing Y in case you then home X again.
-
@whosrdaddy, thanks for the scripts. I think I set them correctly but am getting 'Error: G0/G1 insufficient axes homed' when I try to run it from the HomeX, or macro LCD buttons.
Any idea what the problem is?
@dc42, can't this CoreXY homing be done with a single motor? E.g. stop the current to the (x-y) motor, turn the (x+y) motor in one direction and let it stall at the corner? (since the first motor is neutral, the movement will seek the corner). I don't know if this can be expressed in gcode though.
-
To get a hard stall, both motors need to be energised. Otherwise the driven motor is likely to drive the other motor when a hard endstop is hit, preventing a stall.
-
@dc42 said in Stall based X,Y homing works only once:
To get a hard stall, both motors need to be energised. Otherwise the driven motor is likely to drive the other motor when a hard endstop is hit, preventing a stall.
I tried it by turning one motor manually and it does work. The non energized motor turns freely until the head reaches the X,Y corner and then the energized motor hits hard stall.
As for your previous suggestion of backing off a little, it does work. Originally I commented out these two lines
;G1 X-5 F6000 ; go back a few mm ;G1 S1 X300 F360 ; move slowly to X axis endstop once more (second pass)
but needed to comment out only the second line. Thanks!
-
@zapta : you need
M564 H0
in your config.g or addS2
to theG1
moves. -
@whosrdaddy said in Stall based X,Y homing works only once:
@zapta : you need
M564 H0
in your config.g or addS2
to theG1
moves.Actually it's OK without, because the G1 X-5 command is executed after X has been homed. Adding S2 would change it into a single-motor move, which is not wanted here.