From 876f686502ae97827cc9b915930dace00769377b Mon Sep 17 00:00:00 2001 From: Chaz <134355104+ChazLayyd@users.noreply.github.com> Date: Tue, 21 Jan 2025 19:13:08 +0000 Subject: [PATCH] added macros.cfg because im an idiot and forgot this a month ago --- Firmware/macros.cfg | 229 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 Firmware/macros.cfg diff --git a/Firmware/macros.cfg b/Firmware/macros.cfg new file mode 100644 index 0000000..d6f8221 --- /dev/null +++ b/Firmware/macros.cfg @@ -0,0 +1,229 @@ +[gcode_macro START_PRINT] +gcode: + {% set BED_TEMP = params.T_BED|default(60)|float %} + {% set EXTRUDER_TEMP = params.T_EXTRUDER|default(240)|float %} + + # Set and wait for bed to reach temperature + + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP} + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={BED_TEMP-3} MAXIMUM={BED_TEMP+3} + + # Home X and Y axes in the correct order + G28 X Y + WIPE_NOZZLE + + # Home Z and perform bed mesh calibration + G28 Z + BED_MESH_CALIBRATE + + # Move to bucket to wait for hotend heating up + + G1 X60 Y240 F10000 + G1 Y267 F3000 + + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-5} + + # Wipe nozzle + + G1 X95 F10000 + G1 X75 F10000 + G1 X95 F10000 + G1 X75 F10000 + G1 X95 F5000 + G1 X128 F10000 + G1 Y240 F10000 + + # Purge Line + + LINE_PURGE + +[gcode_macro END_PRINT] +gcode: + # Ensure the printer is in absolute positioning + G90 + # Move to the purge bucket position + M104 S0 ## turn off hotend + M140 S0 ## turn off bed + M204 + M106 S0 ## turn off fans + #G1 X60 Y240 F20000 + #G1 Y265 F3000 + #G1 E-5 F1000 + #G1 Z150 F1000 + #G1 X95 F10000 + #G1 X75 F10000 + #G1 X95 F10000 + #G1 X75 F10000 + G1 X128 F15000 + G1 Y240 F15000 + M84 ## disable motors + BED_MESH_CLEAR + +[gcode_macro UNLOAD_FILAMENT] +gcode: + {% set EXTRUDER_TEMP = params.T_EXTRUDER|default(240)|float %} + # Ensure the printer is in absolute positioning + G90 + # Home X and Y axes in the correct order + G28 X Y + # Move to purge bucket + G1 Y5 F1000 + G1 X60 Y240 F20000 + G1 Y267 F2000 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-5} + # Wipe then move to unload location + G1 X95 F10000 + G1 X70 F10000 + G1 X95 F10000 + G1 X70 F10000 + G1 X120 F15000 + # Move to Filament cutter and cut the filament + G1 X20.00 Y20.5 F25000 + G1 X20.00 Y0.5 F3000 + G1 X10.5 F100 + G1 X20 F1500 + G1 X60 F20000 + G1 Y240 F20000 + G1 Y265 F2000 + # Retract Filament + G1 E-75 F1000 + +[gcode_macro LOAD_FILAMENT] +gcode: + {% set EXTRUDER_TEMP = params.T_EXTRUDER|default(240)|float %} + # Ensure the printer is in absolute positioning + G90 + # Home X and Y axes + G28 X Y + # Move to purge bucket + G1 Y5 F5000 + G1 X60 Y240 F20000 + G1 Y267 F3000 + # Set extruder temperature + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-5} + RESPOND TYPE=echo MSG="You have 15 seconds to load filament into the extruder." + G4 P15000 #P15000 ; 15-second delay + G92 E0 + G1 E70 F400 + M400 + M106 S255 + M104 S0 + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={EXTRUDER_TEMP-30} + # Prompt and delay for filament loading + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=140 + TEMPERATURE_WAIT SENSOR=extruder MINIMUM=145 + G1 X70 F15000 + G1 X76 + G1 X65 + G1 X76 + G1 X65 + G1 X90 F3000 + G1 Y255 + G1 X100 + G1 Y267 + G1 X70 F10000 + G1 X100 F5000 + G1 X70 F10000 + G1 X100 F5000 + G1 X70 F10000 + G1 X100 F5000 + G1 X128 F12000 + G1 Y180 F15000 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=140 + M117 "Filament loaded!" + M400 + M106 P2 S0 + +[gcode_macro WIPE_NOZZLE] +gcode: + {% set EXTRUDER_TEMP = params.T_EXTRUDER|default(220)|float %} + # Move to purge bucket + G1 X60 Y240 F15000 + G1 Y267 F3500 + + # Set extruder temperature + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-5} + G92 E0 + G1 E70 F400 + M400 + M106 S255 + M104 S0 + TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={EXTRUDER_TEMP-30} + + # Wipe the nozzle + G1 X70 F9000 + G1 X78 F15000 + G1 X65 F15000 + G1 X78 F15000 + G1 X65 F15000 + G1 X75 F6000 + G1 X95 F15000 + G1 X75 F15000 + G1 X95 F15000 + G1 X75 F15000 + G1 X95 F15000 + G1 X75 F15000 + G1 X165 F15000 + G4 P500 + G1 X65 Y230 F18000 + G1 Y264 F6000 + G4 P2000 + G1 X95 F15000 + G1 X75 F15000 + G1 X75 F15000 + G1 X75 F15000 + G1 X128 + G1 Y128 F20000 + + M400 + M106 P2 S0 + +[gcode_macro SPEED_TEST_BALLS] +gcode: + + g28 + g1 z30 f500 + g1 x40 y40 f30000 + g1 x210 y210 + g1 x40 y40 + g1 x210 + g1 x40 y210 + g1 x210 y40 + g1 x40 + g1 y210 + g1 x210 + g1 y40 + g1 x125 y125 + g1 x150 y150 + g1 x125 y125 + g1 x150 + g1 x125 y150 + g1 x150 y125 + g1 x125 + g1 y150 + g1 x150 + g1 y125 + g1 x40 y40 + g1 x210 y210 + g1 x40 y40 + g1 x210 + g1 x40 y210 + g1 x210 y40 + g1 x40 + g1 y210 + g1 x210 + g1 y40 + g1 x125 y125 + g1 x150 y150 + g1 x125 y125 + g1 x150 + g1 x125 y150 + g1 x150 y125 + g1 x125 + g1 y150 + g1 x150 + g1 y125