Error: Homing failed when all axis are homed
-
Hi all,
When i run G28 it homes all my axes correctly and then returns the error: "G28 Error: Homing failed".
I looked it up in the forum but i cant find a fix that works for me. Can someone help me out?firmware version: 3.4.0beta3
Im using a SBC (RPi).; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Wed Aug 25 2021 15:37:06 GMT+0200 (Midden-Europese zomertijd) M291 P"Make sure there is no print on the printbed" S2 G91 ; relative positioning M98 P"homez.g" M98 P"homexy.g" if !exists(global.calledFromBed) || global.calledFromBed != true M291 P"Do you want to run bed auto calibration now?" S3 G32 if exists(global.calledFromBed) set global.calledFromBed = false G90 ; absolute positioning
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Wed Aug 25 2021 15:37:06 GMT+0200 (Midden-Europese zomertijd) G91 if sensors.endstops[2].triggered == true G1 H1 Z1 F360 while sensors.endstops[2].triggered == true G1 Z1 F360 G1 H1 Z-825 F360 ; move Z down stopping at the endstop G1 Z3 F360 G1 H1 Z-825 F180 G92 Z{global.endstopHeight} ; set Z position to axis minimum (you may want to adjust this) G1 Z1 G90
;homexy.g G91 ; relative positioning if sensors.endstops[2].triggered == true if move.axes[2].homed == false M98 P"homez.g" else G60 while sensors.endstops[2].triggered == true G1 Z1 F360 G1 H1 X-1105 F6000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 Y-505 ; move quickly to X or Y endstop and stop there (first pass) G1 X5 Y5 ; go back a few mm G1 H1 X-1105 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y-505 G92 X0 Y0 G1 R0 Z0 G90 ; absolute positioning
Thanks in advance,
Piet.
-
@piet which axis or axes does DWC show as not homed after you run G28?
Please post your config.g file.
-
@dc42 Im not sure, it just says G28. They all show up as homed.
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Wed Aug 25 2021 15:37:06 GMT+0200 (Midden-Europese zomertijd) ; General preferences G90 ; send absolute coordinates... M550 P"HC1500" M83 ; ...but relative extruder moves M669 K1 ; select CoreXY mode ; Drives M569 P0.0 S1 ; physical drive 0.0 goes forwards X M569 P0.1 S0 ; physical drive 0.1 goes forwards Y M569 P0.3 S1 ; physical drive 0.3 goes backwards Z1 M569 P0.4 S1 ; physical drive 0.4 goes backwards Z2 M569 P0.5 S1 ; physical drive 0.5 goes backwards Z3 M569 P20.0 S1 ; physical drive 20.0 goes backwards E0 M584 X0.1 Y0.0 Z0.3:0.4:0.5 E20.0 ; set drive mapping M671 X-196:476:1148 Y55.25:631.25:55.25 S5 ; Z belts are at (-196, 55.25), (476, 631.25) and (1148, 55.25) M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X53.33 Y53.33 Z1643.95 E340.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X15000.00 Y15000.00 Z240.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z10.00 E250.00 ; set accelerations (mm/s^2) M906 X500 Y500 Z500 E400 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X1095 Y500 Z820 S0 ; set axis maxima ; Endstops M574 X1 S1 P"!io0.in" ; configure active-high endstop for low end on X via pin !io0.in M574 Y1 S1 P"!20.io2.in" ; configure active-high endstop for low end on Y via pin !io1.in M574 Z1 S1 P"!io1.in" ; configure active-high endstop for low end on Z via pin !io2.in global endstopHeight = 12.26 ; Z-Probe ;M558 P8 C"^20.io0.in" H5 F120 T6000 ; set Z probe type to switch and the dive height + speeds M558 P1 C"!^io3.in" H5 F120 T6000 G31 P0 X0 Y0 Z0 ; set Z probe trigger value, offset and trigger height global triggerVal = 30 ; difference in voltage to trigger probe ;100mV M557 X50:1050 Y50:450 S100 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4596 C8.65111e-8 A"Bed" ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S180 ; set temperature limit for heater 0 to 180C M308 S1 P"20.temp0" Y"pt1000" A"Extruder" ; configure sensor 1 as thermistor on pin 20.temp0 M950 H1 C"20.out0" T1 ; create nozzle heater output on 20.out0 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S300 ; set temperature limit for heater 1 to 300C M308 S2 P"20.temp1" Y"thermistor" T100000 B4596 C8.65111e-8 A"Chamber" ; configure sensor 2 as thermistor on pin temp1 M950 H2 C"out1" T2 ; create chamber heater output on out1 and map it to sensor 2 M307 H2 B0 S1.00 ; disable bang-bang mode for the chamber heater and set PWM limit M141 H2 ; map chamber to heater 2 M143 H2 S80 ; set temperature limit for heater 2 to 80C ; Fans M950 F0 C"20.out1" Q500 ; create fan 0 on pin 121.out1 and set its frequency M106 P0 C"Part Cooling Fan" S0 H-1 ; set fan 0 name and value. Thermostatic control is turned off ; Tools M563 P0 S"Extruder" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M591 D0 P7 C"20.io1.in" L0.061 R80:120 E1 S1 ; set up pulse generating filament monitor ; Miscellaneous M955 P20.0 I46 ; define accelerometer M150 X3 Q2400000 R255 U255 B255 S57 P255 ; define RGBW ledstrip global ledState = 1 global heaterLedState = 3 M501 ; load saved parameters from non-volatile memory M80 ; turn on ATX power M911 S21 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss T0 ; select first tool
-
@piet does it fail regardless of how you respond to "Do you want to run bed auto calibration now?" ?
-
@dc42 Yes it does. I also tried removing that feature altogether and it still threw the error.
-
@piet This is a long shot and I could be wrong but something at the back of my mind is telling me that the firmware will not normally allow homing of Z unless X and Y have already been homed. The reason being that many people use a probe which must first be moved to certain XY coordinates on the bed.
I could be wrong (often am) but try changing the order in your homeall.g so that homexy comes before homez.
-
@deckingman I think you may be onto something there Ian
-
@deckingman said in Error: Homing failed when all axis are homed:
@piet This is a long shot and I could be wrong but something at the back of my mind is telling me that the firmware will not normally allow homing of Z unless X and Y have already been homed. The reason being that many people use a probe which must first be moved to certain XY coordinates on the bed.
I could be wrong (often am) but try changing the order in your homeall.g so that homexy comes before homez.
Good thinking! If no Z endstop has been declared with M574 then RRF assumes you are homing using a Z probe and requires XY to be homed first. But in that case, it should refuse to home Z at the start.
-
@dc42 said in Error: Homing failed when all axis are homed:
Good thinking! If no Z endstop has been declared with M574 then RRF assumes you are homing using a Z probe and requires XY to be homed first. But in that case, it should refuse to home Z at the start.
Looking at the OP's config.g, he seems to have both a switch (M574 Z1 S1 P"!io1.in" )
and a probe (M558 P1 C"!^io3.in" H5 F120 T6000). Maybe that's his problem - and/or the order that axes are homed. -
Hi,
A few questions if you don't mind.
In the homing files you posted what is the intent of the various bits of conditional code that is testing endstop status, homed status, variable status?
Why do you have a homezy.g file? Do you also have a homex.g and a homey.g file?
Thanks.
Frederick
-
@deckingman I tried changing it so it homes X and Y first but that doesn't seem to solve it. Reason i have a Z-endstop is as a safety measure. It triggers ~15mm from the bed and stays triggered moving down. That way i always know when the extruder is close to the bed. That is also why i move it up while the endstop is triggered so it is at a safe distance from the bed for movement to happen.
-
@fcwilt Is there a specific bit you're curious about?
I do have a homex and homey file. The only difference is that in the homexy file it moves diagonally instead of homing each axis seperately. -
@piet said in Error: Homing failed when all axis are homed:
@fcwilt Is there a specific bit you're curious about?
Well how about this bit of code in your homez file?
I see what it is doing I just don't understand why you are doing it.
What is the goal?
Thanks.
Frederick
if sensors.endstops[2].triggered == true G1 H1 Z1 F360 while sensors.endstops[2].triggered == true G1 Z1 F360
-
@fcwilt As i replied to deckingman my Z-endstop triggers around 15mm above the bed and stays triggered below that. Now if i start my printer and the Z-axis isn't homed yet but the endstop is triggered i want it to move up so the endstop is not triggered anymore. However i can't move the Z-axis if it isnt homed yet. Therefore i home it first using the
G1 H1 Z1 F360
so i can move it up with the while loop. After that the endstop is not triggered anymore and i move it down once more so i can set the final home position to a predefined value.I understand it is a bit of a hassle but i want to have an endstop in place next to the probe so i know where i am at before probing.
-
@piet said in Error: Homing failed when all axis are homed:
I understand it is a bit of a hassle but i want to have an endstop in place next to the probe so i know where i am at before probing.
Thanks. I have the same Z endstop setup but mine triggers 20mm (appx) early.
You don't really need to make the test you are making.
Your Z homing code already does the typical pair of slow/fast G1 H1 moves.
The point of the two G1 H1 moves is that the first is fast to get the to endstop quickly, in case the starting point is far away, then the second is slow for unknown reasons.
If the Z endstop is already triggered at the start of Z homing the first G1 H1 "ends" immediately, sets the logical Z position to Zmin and marks the Z axis as homed.
So then the "backup" G1 executes, and then the second G1 H1 executes and homing is complete.
If the endstop triggers 15mm (appx) away and stays triggered that G1 Z3 move may not clear the endstop in all cases. G1 Z20 would always work.
Now if you really want to do a check and backup to allow both G1 H1 moves to actually move you can just do
if sensors.endstops[2].triggered == true G1 H2 Z20 ; or whatever value is needed to clear the endstop in all cases
This works because G1 H2 moves don't require the axis be homed.
Frederick
-
If the endstop triggers 15mm (appx) away and stays triggered that G1 Z3 move may not clear the endstop in all cases. G1 Z20 would always work.
I might not understand you correctly but this is why i use the while loop. It goes up 1mm everytime the endstop is still triggered. This way it does not move up more than it has to and the G1 Z3 will clear it in all cases because it is already positioned above the endstop.
I suppose it is better to use the H2 parameter, i wasn't aware the axis doesn't have to be homed with it.
I'm however still not sre why it throws the error. I've tried the solutions given earlier in this thread but they don't seem to solve the problem.
-
@piet this issue is triggered by the M291 S2 command in your homeall.g file. I have fixed it in the source code, so the fix will be in RRF 3.4.0 stable.