From df9a64bd293204aa2640dedf98a753c843025501 Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Wed, 22 Sep 2021 10:00:46 +0200 Subject: [PATCH] v2.4: move macros to separate file --- macros.cfg | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ printer.cfg | 51 ++++++++++++++------------------------------------- 2 files changed, 64 insertions(+), 37 deletions(-) create mode 100644 macros.cfg diff --git a/macros.cfg b/macros.cfg new file mode 100644 index 0000000..4a4911c --- /dev/null +++ b/macros.cfg @@ -0,0 +1,50 @@ + +[gcode_macro G32] +gcode: + BED_MESH_CLEAR + G28 + QUAD_GANTRY_LEVEL + G28 + G0 X150 Y150 Z30 F3600 + + +[gcode_macro PRINT_START] +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +gcode: + M140 S{BED} # start bed heating + M104 S{EXTRUDER} # start extruder heating + + M117 home + G32 ; home all axes + G1 Z20 F3000 ; move nozzle away from bed + + M117 wait for heating + G92 E0 # reset extruder + M190 S{BED} # set and wait for bed temperature + M109 S{EXTRUDER} # set and wait for nozzle temperature + + M117 clean nozzle + G0 Z5 F300 # move Z to travel height + G0 X75 Y0 F5000 # move to start position + G0 Z0.2 F1500 # lower Z + G0 X225 Y0 Z0.2 E30 # draw line + G0 X225 Y0.8 Z0.2 # move to the side little + G0 X75 Y0.8 Z0.2 E15 # draw fine line + + M117 starting + + +[gcode_macro PRINT_END] +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +gcode: + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-10.0 F3600 ; retract filament + G91 ; relative positioning + G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing + TURN_OFF_HEATERS + M107 ; turn off fan + G1 Z2 F3000 ; move nozzle up 2mm + G90 ; absolute positioning + G0 X125 Y250 F3600 ; park nozzle at rear + BED_MESH_CLEAR diff --git a/printer.cfg b/printer.cfg index 2ae6fde..2d56be6 100644 --- a/printer.cfg +++ b/printer.cfg @@ -30,8 +30,6 @@ serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_1E0030000E5053424E363620-if00 #restart_method: command ##-------------------------------------------------------------------- -[include fluidd.cfg] - [printer] kinematics: corexy max_velocity: 300 @@ -41,6 +39,20 @@ max_z_accel: 350 square_corner_velocity: 5.0 +##################################################################### +# fluidd +##################################################################### + +[include fluidd.cfg] + + +##################################################################### +# Macros +##################################################################### + +[include macros.cfg] + + ##################################################################### # X/Y Stepper Settings ##################################################################### @@ -431,41 +443,6 @@ gcode: SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3 -##################################################################### -# Macros -##################################################################### - -[gcode_macro G32] -gcode: - BED_MESH_CLEAR - G28 - QUAD_GANTRY_LEVEL - G28 - G0 X150 Y150 Z30 F3600 - - -[gcode_macro PRINT_START] -# Use PRINT_START for the slicer starting script - please customise for your slicer of choice -gcode: - G32 ; home all axes - G1 Z20 F3000 ; move nozzle away from bed - - -[gcode_macro PRINT_END] -# Use PRINT_END for the slicer ending script - please customise for your slicer of choice -gcode: - M400 ; wait for buffer to clear - G92 E0 ; zero the extruder - G1 E-10.0 F3600 ; retract filament - G91 ; relative positioning - G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing - TURN_OFF_HEATERS - M107 ; turn off fan - G1 Z2 F3000 ; move nozzle up 2mm - G90 ; absolute positioning - G0 X125 Y250 F3600 ; park nozzle at rear - BED_MESH_CLEAR - #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*#