[gcode_macro remove_material] gcode: {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(210)|float %} # Use absolute coordinates G90 # Turn on Case light SET_LED LED=case_light WHITE=1.00 SYNC=0 TRANSMIT=1 # Home the printer G28 # Move the nozzle to the front G1 X15 Y0 F3000 # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} # Reset extruder G92 E0 # Retract 5 mm slowly G1 F100 E-5 # Retract 800 mm G1 F1500 E-800 [gcode_macro insert_material] gcode: {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(220)|float %} # Use absolute coordinates G90 # Turn on Case light SET_LED LED=case_light WHITE=1.00 SYNC=0 TRANSMIT=1 # Reset extruder G92 E0 # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} # Extrude 650 mm G1 F1500 E650 # Extrude 100 mm slowly G1 F100 E100 [gcode_macro START_PRINT] gcode: {% set BED_TEMP = params.BED_TEMP|default(60)|float %} {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %} # Start bed heating M140 S{BED_TEMP} # Use absolute coordinates G90 # Zero the extruded length G92 E0 # Reset the G-Code Z offset (adjust Z offset if needed) SET_GCODE_OFFSET Z=0.0 # Home the printer G28 # Move the nozzle to the front G1 X15 Y0 F3000 # Wait for bed to reach temperature M190 S{BED_TEMP} # Move the bed close to nozzle G1 Z30 F3000 # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} # Purge 40 mm G1 F100 E40 # Move the nozzle from clamp G1 X30 Y25 Z10 F3000 [gcode_macro END_PRINT] gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 # Use incremental coordinates G91 # Move nozzle away from print while retracting G1 X-2 Y-2 E-3 F300 # Raise nozzle by 10mm G1 Z10 F3000 # Disable steppers M84