Z-Homing Race condition
-
Not sure if this is the right place to post this.
Just today, I managed to accidentally create a z-homing race condition by telling my printer to Home all axes and then sending another command that caused the X and Y axes to not move to the z-homing location before attempting to home Z. the two sequences are listed below:
Scenario 1: Use DWC to initiate "Home All", and then clicked "run mesh compensation" before homing had finished. This resulted in the printer failing to home z because my probe is off the build plate when the hot end is at the Y-home position.
Scenario 2: I started a print (which included homing as part of the starting g-code), and then went to use Z-Babystepping. the same thing happened as before where the X and Y homed, but then failed to move before initiating Z-home routine.
Is there a setting or configuration change I can do to prevent this from happening. I don't recall ever having this issue before (despite doing similar sequences), and its been at least a month or more since I last changed the firmware. The only config changes I made were to reorder M556, and adjust it's values.
I'm running this FW config
-
Can you share the gcode for your homing files?
It would also be good if you could update the firmware to 3.5.3 and verify if the behavious is still the same. -
@Phaedrux sure thing here are all the home.g and my starting machine gcode.
Also, its worth noting that I just had a similar issue with just starting a job (it didn't happen the second time I ran the job). so it might not be a race condition, and instead an issue somewhere else. I also disabled skew compensation entirely (M556) for now
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri Oct 27 2023 16:48:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-205 Y205.5 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y-5 F6000 ; go back a few mm G1 H1 X-205 Y205.5 F360 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G1 X40 Y9.5 F6000 ; go to first bed probe point and home Z G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri Oct 27 2023 16:48:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-205 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 F6000 ; go back a few mm G1 H1 X-205 F360 ; move slowly to X axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
; homey.g ; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri Oct 27 2023 16:48:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Y205.5 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 H2 Y-5 F6000 ; go back a few mm G1 H1 Y205.5 F360 ; move slowly to Y axis endstop once more (second pass) G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.3.16 on Fri Oct 27 2023 16:48:23 GMT-0700 (Pacific Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X40 Y9.5 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
And here is my custom start g-code:
M140 S[first_layer_bed_temperature] ; Set Bed Temp M190 S[first_layer_bed_temperature] ; Wait for Bed temp to reach target M104 S[first_layer_temperature] T0; Set extruder Temperature M109 S[first_layer_temperature] T0; Wait for extruder to reach set temp G28 ;Home M572 D0 S0.5; Enable Pressure Advance G29 S1 ;Load Heightmap and enable bed mesh leveling M376 H1; Taper mesh compensation after 2mm ;Prime the extruder G92 E0 ; Zero Extruder G1 X-1 Y-1 Z3; Move just outside origin and up 3mm, G1 E40 F500; Extrude 35mm filament G1 Z0.25 X50; Squash blob G92 E0; Reset Extruder position