Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.11.0-148-g52f4e20c' CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' =============== Log rollover at Wed May 3 12:08:58 2023 =============== webhooks client 4132069992: Disconnected Restarting printer Start printer at Wed May 3 12:08:59 2023 (1683133739.4 248.0) Unable to open config file /home/pi/printer_data/config/printer.cfg Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 279, in read_main_config data = self._read_config_file(filename) File "/home/pi/klipper/klippy/configfile.py", line 164, in _read_config_file raise error(msg) configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg webhooks client 4132073184: New connection webhooks client 4132073184: Client info {'program': 'Moonraker', 'version': 'v0.8.0-30-g110cbd1'} webhooks client 4132073184: Disconnected Restarting printer Start printer at Wed May 3 12:09:38 2023 (1683133778.6 287.3) Unable to open config file /home/pi/printer_data/config/printer.cfg Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 279, in read_main_config data = self._read_config_file(filename) File "/home/pi/klipper/klippy/configfile.py", line 164, in _read_config_file raise error(msg) configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg webhooks client 4132071360: New connection webhooks client 4132071360: Client info {'program': 'Moonraker', 'version': 'v0.8.0-30-g110cbd1'} Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.11.0-195-g3bd0be40' CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' Building C code module c_helper.so Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.11.0-195-g3bd0be40' CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' Start printer at Wed May 3 12:13:59 2023 (1683134039.4 548.0) Unable to open config file /home/pi/printer_data/config/printer.cfg Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 279, in read_main_config data = self._read_config_file(filename) File "/home/pi/klipper/klippy/configfile.py", line 164, in _read_config_file raise error(msg) configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg webhooks client 4129019120: New connection webhooks client 4129019120: Client info {'program': 'Moonraker', 'version': 'v0.8.0-30-g110cbd1'} webhooks client 4129019120: Disconnected webhooks client 4129020752: New connection webhooks client 4129020752: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.11.0-195-g3bd0be40' CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' Start printer at Wed May 3 12:35:34 2023 (1683135334.6 23.4) Unable to open config file /home/pi/printer_data/config/printer.cfg Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 279, in read_main_config data = self._read_config_file(filename) File "/home/pi/klipper/klippy/configfile.py", line 164, in _read_config_file raise error(msg) configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg webhooks client 4134261544: New connection webhooks client 4134261544: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.11.0-195-g3bd0be40' CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' Start printer at Wed May 3 12:54:54 2023 (1683136494.4 23.7) Unable to open config file /home/pi/printer_data/config/printer.cfg Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/configfile.py", line 158, in _read_config_file f = open(filename, 'r') FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 279, in read_main_config data = self._read_config_file(filename) File "/home/pi/klipper/klippy/configfile.py", line 164, in _read_config_file raise error(msg) configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg webhooks client 4130628392: New connection webhooks client 4130628392: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} webhooks client 4130628392: Disconnected Restarting printer Start printer at Wed May 3 13:04:26 2023 (1683137066.5 522.2) ===== Config file ===== [virtual_sdcard] path = ~/printer_data/gcodes on_error_gcode = CANCEL_PRINT [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE variable_last_extruder_temp = 0 gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} [gcode_macro SET_PAUSE_NEXT_LAYER] description = Enable a pause if the next layer is reached gcode = {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" [gcode_macro SET_PAUSE_AT_LAYER] description = Enable/disable a pause if a given layer number is reached gcode = {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" [gcode_macro SET_PRINT_STATS_INFO] rename_existing = SET_PRINT_STATS_INFO_BASE description = Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode = {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description = Extrudes, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description = Retracts, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_020024001650335331383520-if00 restart_method = command [printer] kinematics = corexy max_velocity = 300 max_accel = 3000 max_z_velocity = 15 max_z_accel = 350 square_corner_velocity = 5.0 [stepper_x] step_pin = PF13 dir_pin = !PF12 enable_pin = !PF14 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG6 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_y] step_pin = PG0 dir_pin = !PG1 enable_pin = !PF15 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG9 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z] step_pin = PF11 dir_pin = !PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = PG10 position_endstop = -0.5 position_max = 310 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z1] step_pin = PG4 dir_pin = PC1 enable_pin = !PA0 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z1] uart_pin = PC7 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z2] step_pin = PF9 dir_pin = !PF10 enable_pin = !PG2 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z2] uart_pin = PF2 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z3] step_pin = PC13 dir_pin = PF0 enable_pin = !PF1 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z3] uart_pin = PE4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 22.6789511 gear_ratio = 50:10 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 heater_pin = PA2 sensor_type = ATC Semitec 104NT-4-R025H42G sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1.0 min_extrude_temp = 170 control = pid pid_kp = 26.213 pid_ki = 1.304 pid_kd = 131.721 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = 0.5 sense_resistor = 0.110 stealthchop_threshold = 0 [heater_bed] sensor_type = Generic 3950 sensor_pin = PF3 max_power = 0.6 min_temp = 0 max_temp = 120 control = pid pid_kp = 58.437 pid_ki = 2.347 pid_kd = 363.769 [probe] x_offset = 0 y_offset = 25.0 z_offset = 0 speed = 10.0 samples = 3 samples_result = median sample_retract_dist = 3.0 samples_tolerance = 0.006 samples_tolerance_retries = 3 [fan] pin = PA8 kick_start_time = 0.5 off_below = 0.10 [heater_fan hotend_fan] pin = PE5 max_power = 1.0 kick_start_time = 0.5 heater = extruder heater_temp = 50.0 [controller_fan controller_fan] pin = PD12 kick_start_time = 0.5 heater = heater_bed [heater_fan exhaust_fan] pin = PD13 max_power = 1.0 shutdown_speed = 0.0 kick_start_time = 5.0 heater = heater_bed heater_temp = 60 fan_speed = 1.0 [idle_timeout] timeout = 1800 [safe_z_home] home_xy_position = -10,-10 speed = 100 z_hop = 10 [quad_gantry_level] gantry_corners = -60,-10 410,420 points = 50,25 50,275 300,275 300,25 speed = 100 horizontal_move_z = 10 retries = 5 retry_tolerance = 0.0075 max_adjust = 10 [board_pins] aliases = EXP1_1=PE8, EXP1_2=PE7, EXP1_3=PE9, EXP1_4=PE10, EXP1_5=PE12, EXP1_6=PE13, EXP1_7=PE14, EXP1_8=PE15, EXP1_9=, EXP1_10=<5V>, EXP2_1=PA6, EXP2_2=PA5, EXP2_3=PB1, EXP2_4=PA4, EXP2_5=PB2, EXP2_6=PA7, EXP2_7=PC15, EXP2_8=, EXP2_9=, EXP2_10=<5V> [display] lcd_type = uc1701 cs_pin = EXP1_3 a0_pin = EXP1_4 rst_pin = EXP1_5 encoder_pins = ^EXP2_5, ^EXP2_3 click_pin = ^!EXP1_2 contrast = 63 spi_software_miso_pin = EXP2_1 spi_software_mosi_pin = EXP2_6 spi_software_sclk_pin = EXP2_2 [gcode_macro PARK] gcode = {% set th = printer.toolhead %} G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 [gcode_macro G32] gcode = SAVE_GCODE_STATE NAME=STATE_G32 G90 G28 QUAD_GANTRY_LEVEL G28 PARK RESTORE_GCODE_STATE NAME=STATE_G32 [gcode_macro PRINT_START] gcode = G32 G90 G1 Z20 F3000 [gcode_macro PRINT_END] gcode = {% set th = printer.toolhead %} {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} SAVE_GCODE_STATE NAME=STATE_PRINT_END M400 G92 E0 G1 E-5.0 F1800 TURN_OFF_HEATERS G90 G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 M107 BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END ======================= Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 141, in _read_config self.load_object(config, section_config.get_name(), None) File "/home/pi/klipper/klippy/klippy.py", line 130, in load_object self.objects[section] = init_func(config.getsection(section)) File "/home/pi/klipper/klippy/extras/heater_bed.py", line 28, in load_config return PrinterHeaterBed(config) File "/home/pi/klipper/klippy/extras/heater_bed.py", line 11, in __init__ self.heater = pheaters.setup_heater(config, 'B') File "/home/pi/klipper/klippy/extras/heaters.py", line 265, in setup_heater self.heaters[heater_name] = heater = Heater(config, sensor) File "/home/pi/klipper/klippy/extras/heaters.py", line 50, in __init__ heater_pin = config.get('heater_pin') File "/home/pi/klipper/klippy/configfile.py", line 57, in get return self._get_wrapper(self.fileconfig.get, option, default, File "/home/pi/klipper/klippy/configfile.py", line 32, in _get_wrapper raise error("Option '%s' in section '%s' must be specified" configparser.Error: Option 'heater_pin' in section 'heater_bed' must be specified webhooks client 4126049064: New connection webhooks client 4126049064: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Unable to issue reset command on MCU 'mcu' webhooks client 4126049064: Disconnected Restarting printer Start printer at Wed May 3 13:04:59 2023 (1683137099.5 555.2) ===== Config file ===== [virtual_sdcard] path = ~/printer_data/gcodes on_error_gcode = CANCEL_PRINT [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE variable_last_extruder_temp = 0 gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} [gcode_macro SET_PAUSE_NEXT_LAYER] description = Enable a pause if the next layer is reached gcode = {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" [gcode_macro SET_PAUSE_AT_LAYER] description = Enable/disable a pause if a given layer number is reached gcode = {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" [gcode_macro SET_PRINT_STATS_INFO] rename_existing = SET_PRINT_STATS_INFO_BASE description = Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode = {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description = Extrudes, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description = Retracts, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_020024001650335331383520-if00 restart_method = command [printer] kinematics = corexy max_velocity = 300 max_accel = 3000 max_z_velocity = 15 max_z_accel = 350 square_corner_velocity = 5.0 [stepper_x] step_pin = PF13 dir_pin = !PF12 enable_pin = !PF14 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG6 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_y] step_pin = PG0 dir_pin = !PG1 enable_pin = !PF15 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG9 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z] step_pin = PF11 dir_pin = !PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = PG10 position_endstop = -0.5 position_max = 310 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z1] step_pin = PG4 dir_pin = PC1 enable_pin = !PA0 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z1] uart_pin = PC7 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z2] step_pin = PF9 dir_pin = !PF10 enable_pin = !PG2 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z2] uart_pin = PF2 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z3] step_pin = PC13 dir_pin = PF0 enable_pin = !PF1 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z3] uart_pin = PE4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 22.6789511 gear_ratio = 50:10 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 heater_pin = PA2 sensor_type = ATC Semitec 104NT-4-R025H42G sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1.0 min_extrude_temp = 170 control = pid pid_kp = 26.213 pid_ki = 1.304 pid_kd = 131.721 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = 0.5 sense_resistor = 0.110 stealthchop_threshold = 0 [heater_bed] heater_pin = PA3 sensor_type = Generic 3950 sensor_pin = PF3 max_power = 0.6 min_temp = 0 max_temp = 120 control = pid pid_kp = 58.437 pid_ki = 2.347 pid_kd = 363.769 [probe] x_offset = 0 y_offset = 25.0 z_offset = 0 speed = 10.0 samples = 3 samples_result = median sample_retract_dist = 3.0 samples_tolerance = 0.006 samples_tolerance_retries = 3 [fan] pin = PA8 kick_start_time = 0.5 off_below = 0.10 [heater_fan hotend_fan] pin = PE5 max_power = 1.0 kick_start_time = 0.5 heater = extruder heater_temp = 50.0 [controller_fan controller_fan] pin = PD12 kick_start_time = 0.5 heater = heater_bed [heater_fan exhaust_fan] pin = PD13 max_power = 1.0 shutdown_speed = 0.0 kick_start_time = 5.0 heater = heater_bed heater_temp = 60 fan_speed = 1.0 [idle_timeout] timeout = 1800 [safe_z_home] home_xy_position = -10,-10 speed = 100 z_hop = 10 [quad_gantry_level] gantry_corners = -60,-10 410,420 points = 50,25 50,275 300,275 300,25 speed = 100 horizontal_move_z = 10 retries = 5 retry_tolerance = 0.0075 max_adjust = 10 [board_pins] aliases = EXP1_1=PE8, EXP1_2=PE7, EXP1_3=PE9, EXP1_4=PE10, EXP1_5=PE12, EXP1_6=PE13, EXP1_7=PE14, EXP1_8=PE15, EXP1_9=, EXP1_10=<5V>, EXP2_1=PA6, EXP2_2=PA5, EXP2_3=PB1, EXP2_4=PA4, EXP2_5=PB2, EXP2_6=PA7, EXP2_7=PC15, EXP2_8=, EXP2_9=, EXP2_10=<5V> [display] lcd_type = uc1701 cs_pin = EXP1_3 a0_pin = EXP1_4 rst_pin = EXP1_5 encoder_pins = ^EXP2_5, ^EXP2_3 click_pin = ^!EXP1_2 contrast = 63 spi_software_miso_pin = EXP2_1 spi_software_mosi_pin = EXP2_6 spi_software_sclk_pin = EXP2_2 [gcode_macro PARK] gcode = {% set th = printer.toolhead %} G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 [gcode_macro G32] gcode = SAVE_GCODE_STATE NAME=STATE_G32 G90 G28 QUAD_GANTRY_LEVEL G28 PARK RESTORE_GCODE_STATE NAME=STATE_G32 [gcode_macro PRINT_START] gcode = G32 G90 G1 Z20 F3000 [gcode_macro PRINT_END] gcode = {% set th = printer.toolhead %} {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} SAVE_GCODE_STATE NAME=STATE_PRINT_END M400 G92 E0 G1 E-5.0 F1800 TURN_OFF_HEATERS G90 G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 M107 BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END ======================= Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect self._read_config() File "/home/pi/klipper/klippy/klippy.py", line 141, in _read_config self.load_object(config, section_config.get_name(), None) File "/home/pi/klipper/klippy/klippy.py", line 130, in load_object self.objects[section] = init_func(config.getsection(section)) File "/home/pi/klipper/klippy/extras/probe.py", line 449, in load_config return PrinterProbe(config, ProbeEndstopWrapper(config)) File "/home/pi/klipper/klippy/extras/probe.py", line 299, in __init__ pin = config.get('pin') File "/home/pi/klipper/klippy/configfile.py", line 57, in get return self._get_wrapper(self.fileconfig.get, option, default, File "/home/pi/klipper/klippy/configfile.py", line 32, in _get_wrapper raise error("Option '%s' in section '%s' must be specified" configparser.Error: Option 'pin' in section 'probe' must be specified webhooks client 4125642512: New connection webhooks client 4125642512: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Unable to issue reset command on MCU 'mcu' webhooks client 4125642512: Disconnected Restarting printer Start printer at Wed May 3 13:05:24 2023 (1683137124.5 580.2) ===== Config file ===== [virtual_sdcard] path = ~/printer_data/gcodes on_error_gcode = CANCEL_PRINT [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE variable_last_extruder_temp = 0 gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} [gcode_macro SET_PAUSE_NEXT_LAYER] description = Enable a pause if the next layer is reached gcode = {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" [gcode_macro SET_PAUSE_AT_LAYER] description = Enable/disable a pause if a given layer number is reached gcode = {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" [gcode_macro SET_PRINT_STATS_INFO] rename_existing = SET_PRINT_STATS_INFO_BASE description = Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode = {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description = Extrudes, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description = Retracts, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_020024001650335331383520-if00 restart_method = command [printer] kinematics = corexy max_velocity = 300 max_accel = 3000 max_z_velocity = 15 max_z_accel = 350 square_corner_velocity = 5.0 [stepper_x] step_pin = PF13 dir_pin = !PF12 enable_pin = !PF14 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG6 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_y] step_pin = PG0 dir_pin = !PG1 enable_pin = !PF15 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG9 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z] step_pin = PF11 dir_pin = !PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = PG10 position_endstop = -0.5 position_max = 310 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z1] step_pin = PG4 dir_pin = PC1 enable_pin = !PA0 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z1] uart_pin = PC7 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z2] step_pin = PF9 dir_pin = !PF10 enable_pin = !PG2 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z2] uart_pin = PF2 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z3] step_pin = PC13 dir_pin = PF0 enable_pin = !PF1 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z3] uart_pin = PE4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 22.6789511 gear_ratio = 50:10 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 heater_pin = PA2 sensor_type = ATC Semitec 104NT-4-R025H42G sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1.0 min_extrude_temp = 170 control = pid pid_kp = 26.213 pid_ki = 1.304 pid_kd = 131.721 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = 0.5 sense_resistor = 0.110 stealthchop_threshold = 0 [heater_bed] heater_pin = PA3 sensor_type = Generic 3950 sensor_pin = PF3 max_power = 0.6 min_temp = 0 max_temp = 120 control = pid pid_kp = 58.437 pid_ki = 2.347 pid_kd = 363.769 [probe] pin = ~!PB7 x_offset = 0 y_offset = 25.0 z_offset = 0 speed = 10.0 samples = 3 samples_result = median sample_retract_dist = 3.0 samples_tolerance = 0.006 samples_tolerance_retries = 3 [fan] pin = PA8 kick_start_time = 0.5 off_below = 0.10 [heater_fan hotend_fan] pin = PE5 max_power = 1.0 kick_start_time = 0.5 heater = extruder heater_temp = 50.0 [controller_fan controller_fan] pin = PD12 kick_start_time = 0.5 heater = heater_bed [heater_fan exhaust_fan] pin = PD13 max_power = 1.0 shutdown_speed = 0.0 kick_start_time = 5.0 heater = heater_bed heater_temp = 60 fan_speed = 1.0 [idle_timeout] timeout = 1800 [safe_z_home] home_xy_position = -10,-10 speed = 100 z_hop = 10 [quad_gantry_level] gantry_corners = -60,-10 410,420 points = 50,25 50,275 300,275 300,25 speed = 100 horizontal_move_z = 10 retries = 5 retry_tolerance = 0.0075 max_adjust = 10 [board_pins] aliases = EXP1_1=PE8, EXP1_2=PE7, EXP1_3=PE9, EXP1_4=PE10, EXP1_5=PE12, EXP1_6=PE13, EXP1_7=PE14, EXP1_8=PE15, EXP1_9=, EXP1_10=<5V>, EXP2_1=PA6, EXP2_2=PA5, EXP2_3=PB1, EXP2_4=PA4, EXP2_5=PB2, EXP2_6=PA7, EXP2_7=PC15, EXP2_8=, EXP2_9=, EXP2_10=<5V> [display] lcd_type = uc1701 cs_pin = EXP1_3 a0_pin = EXP1_4 rst_pin = EXP1_5 encoder_pins = ^EXP2_5, ^EXP2_3 click_pin = ^!EXP1_2 contrast = 63 spi_software_miso_pin = EXP2_1 spi_software_mosi_pin = EXP2_6 spi_software_sclk_pin = EXP2_2 [gcode_macro PARK] gcode = {% set th = printer.toolhead %} G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 [gcode_macro G32] gcode = SAVE_GCODE_STATE NAME=STATE_G32 G90 G28 QUAD_GANTRY_LEVEL G28 PARK RESTORE_GCODE_STATE NAME=STATE_G32 [gcode_macro PRINT_START] gcode = G32 G90 G1 Z20 F3000 [gcode_macro PRINT_END] gcode = {% set th = printer.toolhead %} {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} SAVE_GCODE_STATE NAME=STATE_PRINT_END M400 G92 E0 G1 E-5.0 F1800 TURN_OFF_HEATERS G90 G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 M107 BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 4124160400: New connection webhooks client 4124160400: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Loaded MCU 'mcu' 117 commands (v0.11.0-195-g3bd0be40 / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34) MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder b'Got EOF when reading from device' webhooks: registering remote method 'shutdown_machine' for connection id: 4124160400 webhooks: registering remote method 'reboot_machine' for connection id: 4124160400 webhooks: registering remote method 'pause_job_queue' for connection id: 4124160400 webhooks: registering remote method 'start_job_queue' for connection id: 4124160400 Timeout with MCU 'mcu' (eventtime=587.250471) Transition to shutdown state: Lost communication with MCU 'mcu' Dumping gcode input 0 blocks Dumping 20 requests for client 4124160400 Received 582.170893: b'{"id": 3877460216, "method": "info", "params": {}}' Received 582.422795: b'{"id": 3877461584, "method": "info", "params": {}}' Received 582.423943: b'{"id": 3877461584, "method": "objects/subscribe", "params": {"objects": {"webhooks": null}, "response_template": {"method": "process_status_update"}}}' Received 582.425252: b'{"id": 3877461584, "method": "gcode/subscribe_output", "params": {"response_template": {"method": "process_gcode_response"}}}' Received 582.426681: b'{"id": 3877461752, "method": "list_endpoints", "params": {}}' Received 582.428895: b'{"id": 3877458464, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null}, "response_template": {"method": "process_status_update"}}}' Received 582.676835: b'{"id": 3877460384, "method": "objects/list", "params": {}}' Received 582.678277: b'{"id": 3877478440, "method": "objects/query", "params": {"objects": {"configfile": null}}}' Received 582.928666: b'{"id": 3877481584, "method": "register_remote_method", "params": {"response_template": {"method": "shutdown_machine"}, "remote_method": "shutdown_machine"}}' Received 582.930019: b'{"id": 3877481584, "method": "register_remote_method", "params": {"response_template": {"method": "reboot_machine"}, "remote_method": "reboot_machine"}}' Received 582.931143: b'{"id": 3877481584, "method": "register_remote_method", "params": {"response_template": {"method": "pause_job_queue"}, "remote_method": "pause_job_queue"}}' Received 582.932121: b'{"id": 3877481584, "method": "register_remote_method", "params": {"response_template": {"method": "start_job_queue"}, "remote_method": "start_job_queue"}}' Received 582.934730: b'{"id": 3877461872, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 582.934730: b'{"id": 3877460408, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 582.942498: b'{"id": 3877458944, "method": "info", "params": {}}' Received 582.945478: b'{"id": 3877462224, "method": "objects/list", "params": {}}' Received 582.945478: b'{"id": 3906532616, "method": "gcode/help", "params": {}}' Received 582.964536: b'{"id": 3877458176, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "heater_bed": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null, "extruder": null}, "response_template": {"method": "process_status_update"}}}' Received 583.181439: b'{"id": 3877461800, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 583.181439: b'{"id": 3877459664, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' gcode state: absolute_coord=True absolute_extrude=True base_position=[0.0, 0.0, 0.0, 0.0] last_position=[0.0, 0.0, 0.0, 0.0] homing_position=[0.0, 0.0, 0.0, 0.0] speed_factor=0.016666666666666666 extrude_factor=1.0 speed=25.0 Reactor garbage collection: (582.429223467, 0.0, 0.0) Unable to issue reset command on MCU 'mcu' webhooks client 4124160400: Disconnected Restarting printer Start printer at Wed May 3 13:17:20 2023 (1683137840.4 1296.1) ===== Config file ===== [virtual_sdcard] path = ~/printer_data/gcodes on_error_gcode = CANCEL_PRINT [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE variable_last_extruder_temp = 0 gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} [gcode_macro SET_PAUSE_NEXT_LAYER] description = Enable a pause if the next layer is reached gcode = {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" [gcode_macro SET_PAUSE_AT_LAYER] description = Enable/disable a pause if a given layer number is reached gcode = {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" [gcode_macro SET_PRINT_STATS_INFO] rename_existing = SET_PRINT_STATS_INFO_BASE description = Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode = {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description = Extrudes, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description = Retracts, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_020024001650335331383520-if00 restart_method = command [printer] kinematics = corexy max_velocity = 300 max_accel = 3000 max_z_velocity = 15 max_z_accel = 350 square_corner_velocity = 5.0 [stepper_x] step_pin = PF13 dir_pin = !PF12 enable_pin = !PF14 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG6 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_y] step_pin = PG0 dir_pin = !PG1 enable_pin = !PF15 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG9 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z] step_pin = PF11 dir_pin = !PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = PG10 position_endstop = -0.5 position_max = 310 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z1] step_pin = PG4 dir_pin = PC1 enable_pin = !PA0 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z1] uart_pin = PC7 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z2] step_pin = PF9 dir_pin = !PF10 enable_pin = !PG2 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z2] uart_pin = PF2 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z3] step_pin = PC13 dir_pin = PF0 enable_pin = !PF1 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z3] uart_pin = PE4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 22.6789511 gear_ratio = 50:10 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 heater_pin = PA2 sensor_type = ATC Semitec 104NT-4-R025H42G sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1.0 min_extrude_temp = 170 control = pid pid_kp = 26.213 pid_ki = 1.304 pid_kd = 131.721 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = 0.5 sense_resistor = 0.110 stealthchop_threshold = 0 [heater_bed] heater_pin = PA3 sensor_type = Generic 3950 sensor_pin = PF3 max_power = 0.6 min_temp = 0 max_temp = 120 control = pid pid_kp = 58.437 pid_ki = 2.347 pid_kd = 363.769 [probe] pin = ~!PB7 x_offset = 0 y_offset = 25.0 z_offset = 0 speed = 10.0 samples = 3 samples_result = median sample_retract_dist = 3.0 samples_tolerance = 0.006 samples_tolerance_retries = 3 [fan] pin = PA8 kick_start_time = 0.5 off_below = 0.10 [heater_fan hotend_fan] pin = PE5 max_power = 1.0 kick_start_time = 0.5 heater = extruder heater_temp = 50.0 [controller_fan controller_fan] pin = PD12 kick_start_time = 0.5 heater = heater_bed [heater_fan exhaust_fan] pin = PD13 max_power = 1.0 shutdown_speed = 0.0 kick_start_time = 5.0 heater = heater_bed heater_temp = 60 fan_speed = 1.0 [idle_timeout] timeout = 1800 [safe_z_home] home_xy_position = -10,-10 speed = 100 z_hop = 10 [quad_gantry_level] gantry_corners = -60,-10 410,420 points = 50,25 50,275 300,275 300,25 speed = 100 horizontal_move_z = 10 retries = 5 retry_tolerance = 0.0075 max_adjust = 10 [board_pins] aliases = EXP1_1=PE8, EXP1_2=PE7, EXP1_3=PE9, EXP1_4=PE10, EXP1_5=PE12, EXP1_6=PE13, EXP1_7=PE14, EXP1_8=PE15, EXP1_9=, EXP1_10=<5V>, EXP2_1=PA6, EXP2_2=PA5, EXP2_3=PB1, EXP2_4=PA4, EXP2_5=PB2, EXP2_6=PA7, EXP2_7=PC15, EXP2_8=, EXP2_9=, EXP2_10=<5V> [display] lcd_type = uc1701 cs_pin = EXP1_3 a0_pin = EXP1_4 rst_pin = EXP1_5 encoder_pins = ^EXP2_5, ^EXP2_3 click_pin = ^!EXP1_2 contrast = 63 spi_software_miso_pin = EXP2_1 spi_software_mosi_pin = EXP2_6 spi_software_sclk_pin = EXP2_2 [gcode_macro PARK] gcode = {% set th = printer.toolhead %} G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 [gcode_macro G32] gcode = SAVE_GCODE_STATE NAME=STATE_G32 G90 G28 QUAD_GANTRY_LEVEL G28 PARK RESTORE_GCODE_STATE NAME=STATE_G32 [gcode_macro PRINT_START] gcode = G32 G90 G1 Z20 F3000 [gcode_macro PRINT_END] gcode = {% set th = printer.toolhead %} {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} SAVE_GCODE_STATE NAME=STATE_PRINT_END M400 G92 E0 G1 E-5.0 F1800 TURN_OFF_HEATERS G90 G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 M107 BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 4124491728: New connection webhooks client 4124491728: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Loaded MCU 'mcu' 117 commands (v0.11.0-195-g3bd0be40 / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34) MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder b'Got EOF when reading from device' webhooks: registering remote method 'shutdown_machine' for connection id: 4124491728 webhooks: registering remote method 'reboot_machine' for connection id: 4124491728 webhooks: registering remote method 'pause_job_queue' for connection id: 4124491728 webhooks: registering remote method 'start_job_queue' for connection id: 4124491728 Timeout with MCU 'mcu' (eventtime=1302.989098) Transition to shutdown state: Lost communication with MCU 'mcu' Dumping gcode input 0 blocks Dumping 20 requests for client 4124491728 Received 1297.913305: b'{"id": 3906542440, "method": "info", "params": {}}' Received 1298.164674: b'{"id": 3906542608, "method": "info", "params": {}}' Received 1298.165908: b'{"id": 3906542608, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null}, "response_template": {"method": "process_status_update"}}}' Received 1298.167312: b'{"id": 3906543496, "method": "gcode/subscribe_output", "params": {"response_template": {"method": "process_gcode_response"}}}' Received 1298.168866: b'{"id": 3906540448, "method": "list_endpoints", "params": {}}' Received 1298.170698: b'{"id": 3906542128, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null}, "response_template": {"method": "process_status_update"}}}' Received 1298.418960: b'{"id": 3906540568, "method": "objects/list", "params": {}}' Received 1298.420998: b'{"id": 3877407256, "method": "objects/query", "params": {"objects": {"configfile": null}}}' Received 1298.671557: b'{"id": 3906541600, "method": "register_remote_method", "params": {"response_template": {"method": "shutdown_machine"}, "remote_method": "shutdown_machine"}}' Received 1298.673149: b'{"id": 3906541600, "method": "register_remote_method", "params": {"response_template": {"method": "reboot_machine"}, "remote_method": "reboot_machine"}}' Received 1298.674503: b'{"id": 3906541600, "method": "register_remote_method", "params": {"response_template": {"method": "pause_job_queue"}, "remote_method": "pause_job_queue"}}' Received 1298.675757: b'{"id": 3906541600, "method": "register_remote_method", "params": {"response_template": {"method": "start_job_queue"}, "remote_method": "start_job_queue"}}' Received 1298.678182: b'{"id": 3906541864, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 1298.678769: b'{"id": 3906542488, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 1298.688201: b'{"id": 3906540304, "method": "info", "params": {}}' Received 1298.688201: b'{"id": 3877006640, "method": "objects/list", "params": {}}' Received 1298.691438: b'{"id": 3906540448, "method": "gcode/help", "params": {}}' Received 1298.705811: b'{"id": 3906542248, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 1298.926131: b'{"id": 3906543088, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 1298.926131: b'{"id": 3906560400, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' gcode state: absolute_coord=True absolute_extrude=True base_position=[0.0, 0.0, 0.0, 0.0] last_position=[0.0, 0.0, 0.0, 0.0] homing_position=[0.0, 0.0, 0.0, 0.0] speed_factor=0.016666666666666666 extrude_factor=1.0 speed=25.0 Reactor garbage collection: (1299.180053651, 0.0, 0.0) Unable to issue reset command on MCU 'mcu' webhooks client 4124491728: Disconnected Restarting printer Start printer at Wed May 3 13:26:36 2023 (1683138396.5 1852.3) ===== Config file ===== [virtual_sdcard] path = ~/printer_data/gcodes on_error_gcode = CANCEL_PRINT [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE gcode = SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE variable_last_extruder_temp = 0 gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} [gcode_macro SET_PAUSE_NEXT_LAYER] description = Enable a pause if the next layer is reached gcode = {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" [gcode_macro SET_PAUSE_AT_LAYER] description = Enable/disable a pause if a given layer number is reached gcode = {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" [gcode_macro SET_PRINT_STATS_INFO] rename_existing = SET_PRINT_STATS_INFO_BASE description = Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode = {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description = Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description = Extrudes, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description = Retracts, if the extruder is hot enough gcode = {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_020024001650335331383520-if00 restart_method = command [printer] kinematics = corexy max_velocity = 300 max_accel = 3000 max_z_velocity = 15 max_z_accel = 350 square_corner_velocity = 5.0 [stepper_x] step_pin = PF13 dir_pin = !PF12 enable_pin = !PF14 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG6 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_y] step_pin = PG0 dir_pin = !PG1 enable_pin = !PF15 rotation_distance = 40 microsteps = 32 full_steps_per_rotation = 200 endstop_pin = PG9 position_min = 0 position_endstop = 350 position_max = 350 homing_speed = 25 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z] step_pin = PF11 dir_pin = !PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = PG10 position_endstop = -0.5 position_max = 310 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z1] step_pin = PG4 dir_pin = PC1 enable_pin = !PA0 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z1] uart_pin = PC7 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z2] step_pin = PF9 dir_pin = !PF10 enable_pin = !PG2 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z2] uart_pin = PF2 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [stepper_z3] step_pin = PC13 dir_pin = PF0 enable_pin = !PF1 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 [tmc2209 stepper_z3] uart_pin = PE4 interpolate = false run_current = 0.8 sense_resistor = 0.110 stealthchop_threshold = 0 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 22.6789511 gear_ratio = 50:10 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 heater_pin = PA2 sensor_type = ATC Semitec 104NT-4-R025H42G sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1.0 min_extrude_temp = 170 control = pid pid_kp = 26.213 pid_ki = 1.304 pid_kd = 131.721 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = 0.5 sense_resistor = 0.110 stealthchop_threshold = 0 [heater_bed] heater_pin = PA3 sensor_type = Generic 3950 sensor_pin = PF3 max_power = 0.6 min_temp = 0 max_temp = 120 control = pid pid_kp = 58.437 pid_ki = 2.347 pid_kd = 363.769 [probe] pin = ~!PB7 x_offset = 0 y_offset = 25.0 z_offset = 0 speed = 10.0 samples = 3 samples_result = median sample_retract_dist = 3.0 samples_tolerance = 0.006 samples_tolerance_retries = 3 [fan] pin = PA8 kick_start_time = 0.5 off_below = 0.10 [heater_fan hotend_fan] pin = PE5 max_power = 1.0 kick_start_time = 0.5 heater = extruder heater_temp = 50.0 [controller_fan controller_fan] pin = PD12 kick_start_time = 0.5 heater = heater_bed [heater_fan exhaust_fan] pin = PD13 max_power = 1.0 shutdown_speed = 0.0 kick_start_time = 5.0 heater = heater_bed heater_temp = 60 fan_speed = 1.0 [idle_timeout] timeout = 1800 [safe_z_home] home_xy_position = -10,-10 speed = 100 z_hop = 10 [quad_gantry_level] gantry_corners = -60,-10 410,420 points = 50,25 50,275 300,275 300,25 speed = 100 horizontal_move_z = 10 retries = 5 retry_tolerance = 0.0075 max_adjust = 10 [board_pins] aliases = EXP1_1=PE8, EXP1_2=PE7, EXP1_3=PE9, EXP1_4=PE10, EXP1_5=PE12, EXP1_6=PE13, EXP1_7=PE14, EXP1_8=PE15, EXP1_9=, EXP1_10=<5V>, EXP2_1=PA6, EXP2_2=PA5, EXP2_3=PB1, EXP2_4=PA4, EXP2_5=PB2, EXP2_6=PA7, EXP2_7=PC15, EXP2_8=, EXP2_9=, EXP2_10=<5V> [display] lcd_type = uc1701 cs_pin = EXP1_3 a0_pin = EXP1_4 rst_pin = EXP1_5 encoder_pins = ^EXP2_5, ^EXP2_3 click_pin = ^!EXP1_2 contrast = 63 spi_software_miso_pin = EXP2_1 spi_software_mosi_pin = EXP2_6 spi_software_sclk_pin = EXP2_2 [gcode_macro PARK] gcode = {% set th = printer.toolhead %} G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 [gcode_macro G32] gcode = SAVE_GCODE_STATE NAME=STATE_G32 G90 G28 QUAD_GANTRY_LEVEL G28 PARK RESTORE_GCODE_STATE NAME=STATE_G32 [gcode_macro PRINT_START] gcode = G32 G90 G1 Z20 F3000 [gcode_macro PRINT_END] gcode = {% set th = printer.toolhead %} {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} SAVE_GCODE_STATE NAME=STATE_PRINT_END M400 G92 E0 G1 E-5.0 F1800 TURN_OFF_HEATERS G90 G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 M107 BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 4124408176: New connection webhooks client 4124408176: Client info {'program': 'Moonraker', 'version': 'v0.8.0-39-g6c7dfe5'} Loaded MCU 'mcu' 117 commands (v0.11.0-195-g3bd0be40 / gcc: (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027] binutils: (2.34-4+rpi1+14) 2.34) MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_i2c3=PA8,PC9 BUS_PINS_sdio=PC12,PD2,PC8,PC9,PC10,PC11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi4=PE13,PE14,PE12 CLOCK_FREQ=180000000 MCU=stm32f446xx PWM_MAX=255 RESERVE_PINS_USB=PA11,PA12 RESERVE_PINS_crystal=PH0,PH1 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder b'Got error -1 in write: (19)No such device' b'Got EOF when reading from device' webhooks: registering remote method 'shutdown_machine' for connection id: 4124408176 webhooks: registering remote method 'reboot_machine' for connection id: 4124408176 webhooks: registering remote method 'pause_job_queue' for connection id: 4124408176 webhooks: registering remote method 'start_job_queue' for connection id: 4124408176 Timeout with MCU 'mcu' (eventtime=1860.022720) Transition to shutdown state: Lost communication with MCU 'mcu' Dumping gcode input 0 blocks Dumping 20 requests for client 4124408176 Received 1855.109634: b'{"id": 3867007920, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null}, "response_template": {"method": "process_status_update"}}}' Received 1855.294883: b'{"id": 3866999872, "method": "info", "params": {}}' Received 1855.306785: b'{"id": 3866998216, "method": "info", "params": {}}' Received 1855.306785: b'{"id": 3866997904, "method": "objects/list", "params": {}}' Received 1855.307576: b'{"id": 3866997544, "method": "gcode/help", "params": {}}' Received 1855.330806: b'{"id": 3866998504, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 1855.358498: b'{"id": 3867007992, "method": "objects/list", "params": {}}' Received 1855.363473: b'{"id": 3867007992, "method": "objects/query", "params": {"objects": {"configfile": null}}}' Received 1855.610672: b'{"id": 3867005088, "method": "register_remote_method", "params": {"response_template": {"method": "shutdown_machine"}, "remote_method": "shutdown_machine"}}' Received 1855.612057: b'{"id": 3866907528, "method": "register_remote_method", "params": {"response_template": {"method": "reboot_machine"}, "remote_method": "reboot_machine"}}' Received 1855.613134: b'{"id": 3866907528, "method": "register_remote_method", "params": {"response_template": {"method": "pause_job_queue"}, "remote_method": "pause_job_queue"}}' Received 1855.614124: b'{"id": 3866907528, "method": "register_remote_method", "params": {"response_template": {"method": "start_job_queue"}, "remote_method": "start_job_queue"}}' Received 1855.617232: b'{"id": 3866997592, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 1855.617504: b'{"id": 3867005136, "method": "objects/query", "params": {"objects": {"heaters": null}}}' Received 1855.626031: b'{"id": 3866997904, "method": "info", "params": {}}' Received 1855.626031: b'{"id": 3866997400, "method": "objects/list", "params": {}}' Received 1855.626679: b'{"id": 3866998048, "method": "gcode/help", "params": {}}' Received 1855.642750: b'{"id": 3866998408, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 1855.860366: b'{"id": 3867008016, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' Received 1855.860366: b'{"id": 3866998456, "method": "objects/subscribe", "params": {"objects": {"webhooks": null, "print_stats": null, "heater_bed": null, "extruder": null, "configfile": null, "mcu": null, "gcode_move": null, "virtual_sdcard": null, "pause_resume": null, "display_status": null, "gcode_macro CANCEL_PRINT": null, "gcode_macro PAUSE": null, "gcode_macro RESUME": null, "gcode_macro SET_PAUSE_NEXT_LAYER": null, "gcode_macro SET_PAUSE_AT_LAYER": null, "gcode_macro SET_PRINT_STATS_INFO": null, "gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL": null, "gcode_macro _CLIENT_EXTRUDE": null, "gcode_macro _CLIENT_RETRACT": null, "stepper_enable": null, "tmc2209 stepper_x": null, "tmc2209 stepper_y": null, "tmc2209 stepper_z": null, "tmc2209 stepper_z1": null, "tmc2209 stepper_z2": null, "tmc2209 stepper_z3": null, "tmc2209 extruder": null, "heaters": null, "probe": null, "fan": null, "heater_fan hotend_fan": null, "controller_fan controller_fan": null, "heater_fan exhaust_fan": null, "idle_timeout": null, "quad_gantry_level": null, "gcode_macro PARK": null, "gcode_macro G32": null, "gcode_macro PRINT_START": null, "gcode_macro PRINT_END": null, "motion_report": null, "query_endstops": null, "system_stats": null, "manual_probe": null, "toolhead": null}, "response_template": {"method": "process_status_update"}}}' gcode state: absolute_coord=True absolute_extrude=True base_position=[0.0, 0.0, 0.0, 0.0] last_position=[0.0, 0.0, 0.0, 0.0] homing_position=[0.0, 0.0, 0.0, 0.0] speed_factor=0.016666666666666666 extrude_factor=1.0 speed=25.0 Reactor garbage collection: (1856.02277793, 0.0, 0.0)