IBNobody

Prusa MK4 FIlament Unload

Dec 13th, 2023
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. ; Put UNLOAD (case insensitive) in your PRINT SETTINGS NOTES to cause a filament unload
  2. {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+1, max_print_height)} F720 ; Move print head up{endif}
  3.  
  4. {if notes=~/.*[Uu][Nn][Ll][Oo][Aa][Dd].*/}
  5. ; FILAMENT UNLOAD CODE
  6. G1 X241 Y170 F3600 ; park
  7. {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+23, max_print_height)} F300 ; Move print head up{endif}
  8. G4 ; wait
  9. M702 T0 ; Eject filament
  10. {endif}
  11.  
  12. M104 S0 ; turn off temperature
  13. M140 S0 ; turn off heatbed
  14. M107 ; turn off fan
  15.  
  16. {if notes!~/.*[Uu][Nn][Ll][Oo][Aa][Dd].*/}
  17. ; NO FILAMENT UNLOAD CODE
  18. G1 X241 Y170 F3600 ; park
  19. {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+23, max_print_height)} F300 ; Move print head up{endif}
  20. G4 ; wait
  21. {endif}
  22.  
  23. M900 K0 ; reset LA
  24. M142 S36 ; reset heatbreak target temp
  25. M84 X Y E ; disable motors
  26. ; max_layer_z = [max_layer_z]
Advertisement
Add Comment
Please, Sign In to add comment