Advertisement
seston

klipper start end macro

Apr 3rd, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. # Replace the slicer's custom start and end g-code scripts with
  2. # START_PRINT and END_PRINT. See docs/Slicers.md for more information on using these macros.
  3.  
  4. [gcode_macro START_PRINT]
  5. gcode:
  6. {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  7. {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
  8. # Start bed heating
  9. M140 S{BED_TEMP}
  10. # Use absolute coordinates
  11. G90
  12. # Reset the G-Code Z offset (adjust Z offset if needed)
  13. SET_GCODE_OFFSET Z=0.0
  14. # Home the printer
  15. G28
  16. # Move the nozzle near the bed
  17. G1 Z5 F3000
  18. # Move the nozzle very close to the bed
  19. G1 Z0.15 F300
  20. # Wait for bed to reach temperature
  21. M190 S{BED_TEMP}
  22. # Set and wait for nozzle to reach temperature
  23. M109 S{EXTRUDER_TEMP}
  24.  
  25. [gcode_macro END_PRINT]
  26. gcode:
  27. # Turn off bed, extruder, and fan
  28. M140 S0
  29. M104 S0
  30. M106 S0
  31. # Move nozzle away from print while retracting
  32. G91
  33. G1 X-2 Y-2 E-3 F300
  34. # Raise nozzle by 10mm
  35. G1 Z10 F3000
  36. G90
  37. # Disable steppers
  38. M84
  39.  
  40.  
  41. ######################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement