# This line includes all the standard macros. [include /home/sonic/printer_data/config/klipper-macros/*.cfg] # Uncomment to include features that require specific hardware support. # LCD menu support for features like bed surface selection and pause next layer. #[include /home/sonic/printer_data/config/klipper-macros/optional/lcd_menus.cfg] # Optimized bed leveling #[include /home/sonic/printer_data/config/klipper-macros/optional/bed_mesh.cfg] # All customizations are documented in globals.cfg. Just copy a variable from # there into the section below, and change the value to meet your needs. [gcode_macro _km_options] # These are examples of some likely customizations: # Any sheets in the below list will be available with a configurable offset. #variable_bed_surfaces: ['smooth_1','texture_1'] # Length (in mm) of filament to load (bowden tubes will be longer). #variable_load_length: 90.0 # Hide the Octoprint LCD menu since I don't use it. #variable_menu_show_octoprint: False # Customize the filament menus (up to 10 entries). #variable_menu_temperature: [ # {'name' : 'PLA', 'extruder' : 200.0, 'bed' : 60.0}, # {'name' : 'PETG', 'extruder' : 230.0, 'bed' : 85.0}, # {'name' : 'ABS', 'extruder' : 245.0, 'bed' : 110.0, 'chamber' : 60}] # Length of filament (in millimeters) to purge at print start. #variable_start_purge_length: 30 # This value works for most setups. gcode: # This line is required by Klipper. # Any code you put here will run at klipper startup, after the initialization # for these macros. For example, you could uncomment the following line to # automatically adjust your bed surface offsets to account for any changes made # to your Z endstop or probe offset. # ADJUST_SURFACE_OFFSETS # The sections below here are required for the macros to work. If your config # already has some of these sections you should merge the duplicates into one # (or if they are identical just remove one of them). [idle_timeout] gcode: _KM_IDLE_TIMEOUT # This line must be in your idle_timeout section. [pause_resume] [respond] [save_variables] filename: ~/CR10S_data/variables.cfg # UPDATE THIS FOR YOUR PATH!!! [virtual_sdcard] path: ~/CR10S_data/gcodes on_error_gcode: CANCEL_PRINT [display_status] [exclude_object] #[force_move] #enable_force_move: True ##//FORCE_MOVE STEPPER=extruder DISTANCE=100 VELOCITY=50//SET_KINEMATIC_POSITION X=0 Y=0 Z=0 #[gcode_macro G29] #gcode: # G28 # BED_MESH_CALIBRATE # BED_MESH_OUTPUT #[gcode_macro M0] #gcode: [gcode_macro M48] gcode: G1 Z5 PROBE G1 Z5 PROBE G1 Z5 PROBE G1 Z5 PROBE G1 Z5 PROBE G1 Z20 [gcode_macro Self_Test] gcode: BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down BLTOUCH_DEBUG COMMAND=pin_up BLTOUCH_DEBUG COMMAND=pin_down [gcode_macro T0] gcode: ACTIVATE_EXTRUDER EXTRUDER=extruder #[gcode_macro T1] #gcode: # ACTIVATE_EXTRUDER EXTRUDER=extruder #[gcode_macro T2] #gcode: # ACTIVATE_EXTRUDER EXTRUDER=extruder #[gcode_macro T3] #gcode: # ACTIVATE_EXTRUDER EXTRUDER=extruder # Copyright (C) 2022 Justin Schuh [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 # Reset the G-Code Z offset (adjust Z offset if needed) SET_GCODE_OFFSET Z=0.0 # Home the printer G28 # Move the nozzle near the bed G1 Z5 F3000 # Move the nozzle very close to the bed G1 Z0.15 F300 # Wait for bed to reach temperature M190 S{BED_TEMP} # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} [gcode_macro END_PRINT] variable_machine_depth: 300 gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 # Relative positionning G91 # Retract and raise Z G1 Z0.2 E-2 F2400 # Wipe out G1 X5 Y5 F3000 # Raise Z more G1 Z10 # Absolute positionning G90 # Present print G1 X0 Y{machine_depth} # Disable steppers M84 # Print message on LCD M117 That's All Folks ##############################################################################