Guest User

Untitled

a guest
Jan 9th, 2024
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.50 KB | None | 0 0
  1. [gcode_macro PRINT_START]
  2. gcode:
  3.    {% set EXTRUDER_TEMP = params.EXTRUDER|default(190)|float %}
  4.     {% set BED_TEMP = params.BED|default(60)|float %}
  5.     # Start bed heating
  6.     M140 S{BED_TEMP}
  7.     # Use absolute coordinates
  8.     G90
  9.     # Reset the G-Code Z offset (adjust Z offset if needed)
  10.     SET_GCODE_OFFSET Z=0.0
  11.     # Home the printer
  12.     G28
  13.     # Set and wait for bed to reach temperature
  14.     M190 S{BED_TEMP}
  15.     # KAMP calibration
  16.     BED_MESH_CALIBRATE
  17.     BED_MESH_PROFILE LOAD=default
  18.     # Move the nozzle near the bed
  19.     G1 Z5 F3000
  20.     G1 X0.1 Y20 Z0.3 F5000.0
  21.     # Set and wait for nozzle to reach temperature
  22.     M109 S{EXTRUDER_TEMP}
  23.     G92 E0 ; Reset Extruder
  24.     G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
  25.     G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
  26.     G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
  27.     G92 E0 ; Reset Extruder
  28.     G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
  29.     G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish    
  30.  
  31. [gcode_macro PRINT_END]
  32. gcode:
  33.  {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  34.   {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  35.     # Turn off bed, extruder, and fan
  36.     M140 S0
  37.     M104 S0
  38.     M106 S0
  39.     # Move nozzle away from print while retracting
  40.     G91
  41.     G1 Z20 E-30 F1500
  42.     # Reset extruder
  43.     G92 E0
  44.     # Absolute coords
  45.     G90
  46.     # Move to park position
  47.     G1 X{x_park} Y{y_park}
  48.     # Disable steppers
  49.     M84
Advertisement
Add Comment
Please, Sign In to add comment