Notifications
Clear all

End g-code don't end at requested position  

  RSS
JanP
 JanP
(@janp)
Member
End g-code don't end at requested position

I use the following End g-code in Pruse Slicer 2.9.3 and my MK4 (firmware 6.2.6+8948) . The printer moves to the requested position G1 X50 Y210 Z170, but afterwards the printer head moves in the x-direction to the right position. Is it my End g-code or does the Printer or software have other settings that changes this?

This is my End g-code entered in the Prusa Slicer program.

 

; === Prusa MK4 End G-code ===

; Lift nozzle a bit to avoid hitting the print

{if layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)} F720 ; lift head{endif}

; Turn off heaters and fan

M104 S0 ; turn off nozzle heater

M140 S0 ; turn off bed heater

M107 ; turn off fan

; Move head to safe park position: center (X=125), back (Y=210), Z=170

G1 X50 Y210 Z170 F6000

; Small pause (optional)

G4 ; wait

; Reset firmware settings

M900 K0 ; reset Linear Advance

M142 S36 ; reset heatbreak target temp

; Disable motors

M84 X Y E

; === End ===

Napsal : 13/09/2025 12:00 pm
JanP
 JanP
(@janp)
Member
Topic starter answered:
RE: End g-code don't end at requested position

I have also tried to use that standard End g-code with a change of X=120 (and closed Pruse Slicer, open the program again and checking the g-code), but the printer head are still going all the way to the right (X=220).

I can still see, that the changes of  X have a influence in the head movement, but afterwards the head moves to X=220.

The code now the following:

{if layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}

M104 S0 ; turn off temperature

M140 S0 ; turn off heatbed

M107 ; turn off fan

G1 X120 Y170 F3600 ; park

;{if layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+23, max_print_height)} F300  ; Move print head up{endif}

G4 ; wait

M900 K0 ; reset LA

M142 S36 ; reset heatbreak target temp

M84 X Y E ; disable motors

; max_layer_z = [max_layer_z]

Napsal : 13/09/2025 1:30 pm
Share: