Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [gcode_macro PRINT_START]
- gcode:
- {% set EXTRUDER_TEMP = params.EXTRUDER|default(190)|float %}
- {% set BED_TEMP = params.BED|default(60)|float %}
- # Start bed heating
- M140 S{BED_TEMP}
- # Use absolute coordinates
- G90
- # Reset the G-Code Z offset (adjust Z offset if needed)
- SET_GCODE_OFFSET Z=0.0
- # Home the printer
- G28
- # Set and wait for bed to reach temperature
- M190 S{BED_TEMP}
- # KAMP calibration
- BED_MESH_CALIBRATE
- BED_MESH_PROFILE LOAD=default
- # Move the nozzle near the bed
- G1 Z5 F3000
- G1 X0.1 Y20 Z0.3 F5000.0
- # Set and wait for nozzle to reach temperature
- M109 S{EXTRUDER_TEMP}
- G92 E0 ; Reset Extruder
- G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
- G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
- G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
- G92 E0 ; Reset Extruder
- G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
- G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
- [gcode_macro PRINT_END]
- gcode:
- {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
- {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
- # Turn off bed, extruder, and fan
- M140 S0
- M104 S0
- M106 S0
- # Move nozzle away from print while retracting
- G91
- G1 Z20 E-30 F1500
- # Reset extruder
- G92 E0
- # Absolute coords
- G90
- # Move to park position
- G1 X{x_park} Y{y_park}
- # Disable steppers
- M84
Advertisement
Add Comment
Please, Sign In to add comment