Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 09:17:19 2023 (1675952239.3 26.3) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder Stats 30.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3355 bytes_read=6437 bytes_retransmit=9 bytes_invalid=0 send_seq=278 receive_seq=278 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179999556 heater_bed: target=0 temp=0.0 pwm=0.000 sysload=1.48 cputime=3.101 memavail=767196 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 Stats 31.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3361 bytes_read=6468 bytes_retransmit=9 bytes_invalid=0 send_seq=279 receive_seq=279 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180001456 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=1.93 cputime=3.106 memavail=760952 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 Stats 32.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3367 bytes_read=6604 bytes_retransmit=9 bytes_invalid=0 send_seq=280 receive_seq=280 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002591 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=1.93 cputime=3.115 memavail=753240 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 33.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3373 bytes_read=6725 bytes_retransmit=9 bytes_invalid=0 send_seq=281 receive_seq=281 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002472 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=1.93 cputime=3.123 memavail=752076 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 34.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3379 bytes_read=6846 bytes_retransmit=9 bytes_invalid=0 send_seq=282 receive_seq=282 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003315 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=1.93 cputime=3.131 memavail=749288 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 35.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3385 bytes_read=6952 bytes_retransmit=9 bytes_invalid=0 send_seq=283 receive_seq=283 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002851 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=1.93 cputime=3.138 memavail=748756 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 36.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3391 bytes_read=7073 bytes_retransmit=9 bytes_invalid=0 send_seq=284 receive_seq=284 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002562 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.25 cputime=3.145 memavail=748756 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 37.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3397 bytes_read=7208 bytes_retransmit=9 bytes_invalid=0 send_seq=285 receive_seq=285 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002605 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.25 cputime=3.153 memavail=748428 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 38.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3403 bytes_read=7314 bytes_retransmit=9 bytes_invalid=0 send_seq=286 receive_seq=286 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002556 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.25 cputime=3.160 memavail=754452 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 39.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3409 bytes_read=7435 bytes_retransmit=9 bytes_invalid=0 send_seq=287 receive_seq=287 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002555 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.25 cputime=3.168 memavail=748028 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 40.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3415 bytes_read=7556 bytes_retransmit=9 bytes_invalid=0 send_seq=288 receive_seq=288 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002585 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.25 cputime=3.176 memavail=751804 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 webhooks client 1970706712: New connection Stats 41.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3421 bytes_read=7662 bytes_retransmit=9 bytes_invalid=0 send_seq=289 receive_seq=289 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002628 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.47 cputime=3.185 memavail=748836 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 webhooks client 1970706712: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} webhooks: registering remote method 'shutdown_machine' for connection id: 1970706712 webhooks: registering remote method 'reboot_machine' for connection id: 1970706712 webhooks: registering remote method 'pause_job_queue' for connection id: 1970706712 webhooks: registering remote method 'start_job_queue' for connection id: 1970706712 Stats 42.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3427 bytes_read=7797 bytes_retransmit=9 bytes_invalid=0 send_seq=290 receive_seq=290 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002668 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.47 cputime=3.225 memavail=746340 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 43.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3433 bytes_read=7918 bytes_retransmit=9 bytes_invalid=0 send_seq=291 receive_seq=291 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002702 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.47 cputime=3.271 memavail=744976 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 44.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3445 bytes_read=8038 bytes_retransmit=9 bytes_invalid=0 send_seq=293 receive_seq=293 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002772 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.47 cputime=3.315 memavail=744260 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 45.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3451 bytes_read=8150 bytes_retransmit=9 bytes_invalid=0 send_seq=294 receive_seq=294 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002877 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.47 cputime=3.330 memavail=743652 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 46.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3457 bytes_read=8270 bytes_retransmit=9 bytes_invalid=0 send_seq=295 receive_seq=295 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002874 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.76 cputime=3.347 memavail=743732 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 47.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3463 bytes_read=8390 bytes_retransmit=9 bytes_invalid=0 send_seq=296 receive_seq=296 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002857 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.76 cputime=3.363 memavail=743724 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 48.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3469 bytes_read=8511 bytes_retransmit=9 bytes_invalid=0 send_seq=297 receive_seq=297 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002851 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=2.76 cputime=3.380 memavail=743724 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 49.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3475 bytes_read=8632 bytes_retransmit=9 bytes_invalid=0 send_seq=298 receive_seq=298 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002845 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.76 cputime=3.396 memavail=744216 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 50.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3481 bytes_read=8738 bytes_retransmit=9 bytes_invalid=0 send_seq=299 receive_seq=299 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002817 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.76 cputime=3.412 memavail=744240 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 51.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3487 bytes_read=8859 bytes_retransmit=9 bytes_invalid=0 send_seq=300 receive_seq=300 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002811 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.78 cputime=3.430 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 52.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3493 bytes_read=8994 bytes_retransmit=9 bytes_invalid=0 send_seq=301 receive_seq=301 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002816 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.78 cputime=3.447 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 53.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3499 bytes_read=9100 bytes_retransmit=9 bytes_invalid=0 send_seq=302 receive_seq=302 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002807 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=2.78 cputime=3.465 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.9 pwm=0.000 Stats 54.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3505 bytes_read=9221 bytes_retransmit=9 bytes_invalid=0 send_seq=303 receive_seq=303 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002811 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.78 cputime=3.482 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 55.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3511 bytes_read=9342 bytes_retransmit=9 bytes_invalid=0 send_seq=304 receive_seq=304 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002798 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.78 cputime=3.500 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Stats 56.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3517 bytes_read=9448 bytes_retransmit=9 bytes_invalid=0 send_seq=305 receive_seq=305 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002794 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.79 cputime=3.519 memavail=744248 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.0 pwm=0.000 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 10:43:01 2023 (1675957381.6 1042.4) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968034960: New connection webhooks client 1968034960: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} mcu 'mcu': got {'#receive_time': 1044.597561164, u'next_clock': 3996006272L, u'oid': 22, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 1044.58487632} mcu 'mcu': got {'#receive_time': 1044.707988091, u'next_clock': 4015806272L, u'oid': 33, u'value': 31598, '#name': u'analog_in_state', '#sent_time': 1044.689131268} mcu 'mcu': got {'#receive_time': 1044.898524549, u'next_clock': 4050006272L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 1044.846907257} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder webhooks: registering remote method 'shutdown_machine' for connection id: 1968034960 webhooks: registering remote method 'reboot_machine' for connection id: 1968034960 webhooks: registering remote method 'pause_job_queue' for connection id: 1968034960 webhooks: registering remote method 'start_job_queue' for connection id: 1968034960 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 10:56:31 2023 (1675958191.4 1852.2) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968509976: New connection webhooks client 1968509976: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} mcu 'mcu': got {'#receive_time': 1854.194928198, u'next_clock': 3696918208L, u'oid': 33, u'value': 31600, '#name': u'analog_in_state', '#sent_time': 1854.191063146} mcu 'mcu': got {'#receive_time': 1854.384180594, u'next_clock': 3731118208L, u'oid': 22, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 1854.348015542} mcu 'mcu': got {'#receive_time': 1854.494557625, u'next_clock': 3750918208L, u'oid': 33, u'value': 31601, '#name': u'analog_in_state', '#sent_time': 1854.451317053} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder webhooks: registering remote method 'shutdown_machine' for connection id: 1968509976 webhooks: registering remote method 'reboot_machine' for connection id: 1968509976 webhooks: registering remote method 'pause_job_queue' for connection id: 1968509976 webhooks: registering remote method 'start_job_queue' for connection id: 1968509976 Stats 2365.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=6181 bytes_read=66775 bytes_retransmit=9 bytes_invalid=0 send_seq=770 receive_seq=770 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002900 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=1.82 cputime=13.843 memavail=751696 print_time=2369.409 buffer_time=0.524 print_stall=0 extruder: target=0 temp=19.9 pwm=0.000 Attempting MCU 'mcu' reset command webhooks client 1968509976: Disconnected Restarting printer Start printer at Thu Feb 9 11:05:06 2023 (1675958706.3 2367.2) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 157, 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/resonance_tester.py", line 319, in load_config return ResonanceTester(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 122, in __init__ self.test = VibrationPulseTest(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 61, in __init__ parser=float, count=3) File "/home/pi/klipper/klippy/configfile.py", line 95, in getlists note_valid=note_valid) File "/home/pi/klipper/klippy/configfile.py", line 33, in _get_wrapper % (option, self.section)) Error: Option 'probe_points' in section 'resonance_tester' must be specified webhooks client 1972139792: New connection webhooks client 1972139792: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Option 'probe_points' in section 'resonance_tester' must be specified Once the underlying issue is corrected, use the "RESTART" command to reload the config and restart the host software. Printer is halted Unable to issue reset command on MCU 'mcu' Unable to issue reset command on MCU 'rpi' webhooks client 1972139792: Disconnected Restarting printer Start printer at Thu Feb 9 11:06:27 2023 (1675958787.8 2448.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 157, 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/resonance_tester.py", line 319, in load_config return ResonanceTester(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 122, in __init__ self.test = VibrationPulseTest(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 61, in __init__ parser=float, count=3) File "/home/pi/klipper/klippy/configfile.py", line 95, in getlists note_valid=note_valid) File "/home/pi/klipper/klippy/configfile.py", line 33, in _get_wrapper % (option, self.section)) Error: Option 'probe_points' in section 'resonance_tester' must be specified webhooks client 1968998640: New connection webhooks client 1968998640: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Unable to issue reset command on MCU 'mcu' Unable to issue reset command on MCU 'rpi' webhooks client 1968998640: Disconnected Restarting printer Start printer at Thu Feb 9 11:07:13 2023 (1675958833.5 2494.4) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 157, 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/resonance_tester.py", line 319, in load_config return ResonanceTester(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 122, in __init__ self.test = VibrationPulseTest(config) File "/home/pi/klipper/klippy/extras/resonance_tester.py", line 61, in __init__ parser=float, count=3) File "/home/pi/klipper/klippy/configfile.py", line 95, in getlists note_valid=note_valid) File "/home/pi/klipper/klippy/configfile.py", line 33, in _get_wrapper % (option, self.section)) Error: Option 'probe_points' in section 'resonance_tester' must be specified webhooks client 1969427240: New connection webhooks client 1969427240: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Unable to issue reset command on MCU 'mcu' Unable to issue reset command on MCU 'rpi' webhooks client 1969427240: Disconnected Restarting printer Start printer at Thu Feb 9 11:08:20 2023 (1675958900.1 2561.0) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968887168: New connection webhooks client 1968887168: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' webhooks client 1968887168: Disconnected Restarting printer Start printer at Thu Feb 9 11:09:31 2023 (1675958971.1 2632.0) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968915840: New connection webhooks client 1968915840: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' Printer is not ready The klippy host software is attempting to connect. Please retry in a few moments. mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(661): Thu Feb 9 10:42:05 2023 ========= Last MCU build config ========= CONFIG_LOW_LEVEL_OPTIONS=y # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_INITIAL_PINS="" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 10:42:40 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 10:42:54 2023 webhooks client 1968915840: Disconnected Restarting printer Start printer at Thu Feb 9 11:21:49 2023 (1675959709.7 3370.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968810984: New connection webhooks client 1968810984: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(661): Thu Feb 9 10:42:05 2023 ========= Last MCU build config ========= CONFIG_LOW_LEVEL_OPTIONS=y # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_INITIAL_PINS="" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 10:42:40 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 10:42:54 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 11:38:14 2023 (1675960694.2 4355.0) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1967491232: New connection webhooks client 1967491232: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Attempting MCU 'mcu' reset command Unable to issue reset command on MCU 'rpi' webhooks client 1967491232: Disconnected Restarting printer Start printer at Thu Feb 9 11:41:04 2023 (1675960864.0 4524.9) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968013144: New connection webhooks client 1968013144: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 11:47:17 2023 (1675961237.8 4898.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968252928: New connection webhooks client 1968252928: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} mcu 'mcu': got {u'count': 229, '#receive_time': 4900.76418188, u'sum': 257731, u'sumsq': 1978770, '#name': u'stats', '#sent_time': 4900.733416255} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' Printer is not ready The klippy host software is attempting to connect. Please retry in a few moments. mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Attempting MCU 'mcu' reset command Unable to issue reset command on MCU 'rpi' webhooks client 1968252928: Disconnected Restarting printer Start printer at Thu Feb 9 11:49:40 2023 (1675961380.8 5041.6) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968632936: New connection webhooks client 1968632936: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder Stats 5044.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3355 bytes_read=6437 bytes_retransmit=9 bytes_invalid=0 send_seq=278 receive_seq=278 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179996442 heater_bed: target=0 temp=0.0 pwm=0.000 sysload=2.68 cputime=5.477 memavail=747140 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 webhooks: registering remote method 'shutdown_machine' for connection id: 1968632936 webhooks: registering remote method 'reboot_machine' for connection id: 1968632936 webhooks: registering remote method 'pause_job_queue' for connection id: 1968632936 webhooks: registering remote method 'start_job_queue' for connection id: 1968632936 Stats 5045.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3361 bytes_read=6483 bytes_retransmit=9 bytes_invalid=0 send_seq=279 receive_seq=279 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180006933 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.70 cputime=5.561 memavail=746556 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5046.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3367 bytes_read=6604 bytes_retransmit=9 bytes_invalid=0 send_seq=280 receive_seq=280 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180004572 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.70 cputime=5.619 memavail=747500 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5047.4: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3373 bytes_read=6740 bytes_retransmit=9 bytes_invalid=0 send_seq=281 receive_seq=281 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003195 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.70 cputime=5.639 memavail=747556 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5048.4: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3379 bytes_read=6846 bytes_retransmit=9 bytes_invalid=0 send_seq=282 receive_seq=282 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003132 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.70 cputime=5.662 memavail=747556 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5049.4: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3385 bytes_read=6967 bytes_retransmit=9 bytes_invalid=0 send_seq=283 receive_seq=283 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003262 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.70 cputime=5.685 memavail=747556 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5050.4: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3391 bytes_read=7088 bytes_retransmit=9 bytes_invalid=0 send_seq=284 receive_seq=284 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003118 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.73 cputime=5.709 memavail=747556 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5051.4: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3397 bytes_read=7194 bytes_retransmit=9 bytes_invalid=0 send_seq=285 receive_seq=285 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003034 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.73 cputime=5.733 memavail=747560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5052.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3403 bytes_read=7329 bytes_retransmit=9 bytes_invalid=0 send_seq=286 receive_seq=286 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003098 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.73 cputime=5.756 memavail=747560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5053.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3409 bytes_read=7450 bytes_retransmit=9 bytes_invalid=0 send_seq=287 receive_seq=287 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003061 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.73 cputime=5.780 memavail=747560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5054.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3415 bytes_read=7556 bytes_retransmit=9 bytes_invalid=0 send_seq=288 receive_seq=288 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003089 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.73 cputime=5.803 memavail=747560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5055.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3421 bytes_read=7677 bytes_retransmit=9 bytes_invalid=0 send_seq=289 receive_seq=289 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003145 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.75 cputime=5.827 memavail=747560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5056.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3427 bytes_read=7798 bytes_retransmit=9 bytes_invalid=0 send_seq=290 receive_seq=290 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003125 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.75 cputime=5.852 memavail=747296 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5057.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3433 bytes_read=7918 bytes_retransmit=9 bytes_invalid=0 send_seq=291 receive_seq=291 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003108 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.75 cputime=5.876 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5058.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3439 bytes_read=8039 bytes_retransmit=9 bytes_invalid=0 send_seq=292 receive_seq=292 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003076 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.75 cputime=5.901 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5059.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3445 bytes_read=8160 bytes_retransmit=9 bytes_invalid=0 send_seq=293 receive_seq=293 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003074 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.75 cputime=5.925 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5060.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3451 bytes_read=8266 bytes_retransmit=9 bytes_invalid=0 send_seq=294 receive_seq=294 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003048 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.77 cputime=5.948 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5061.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3457 bytes_read=8387 bytes_retransmit=9 bytes_invalid=0 send_seq=295 receive_seq=295 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003052 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.77 cputime=5.972 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5062.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3463 bytes_read=8522 bytes_retransmit=9 bytes_invalid=0 send_seq=296 receive_seq=296 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003028 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.77 cputime=5.997 memavail=747320 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5063.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3469 bytes_read=8628 bytes_retransmit=9 bytes_invalid=0 send_seq=297 receive_seq=297 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003008 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.77 cputime=6.021 memavail=747328 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5064.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3475 bytes_read=8749 bytes_retransmit=9 bytes_invalid=0 send_seq=298 receive_seq=298 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002977 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.77 cputime=6.046 memavail=747328 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5065.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3487 bytes_read=8883 bytes_retransmit=9 bytes_invalid=0 send_seq=300 receive_seq=300 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002970 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.79 cputime=6.072 memavail=747328 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5066.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3493 bytes_read=8982 bytes_retransmit=9 bytes_invalid=0 send_seq=301 receive_seq=301 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002975 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.79 cputime=6.097 memavail=747584 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5067.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3499 bytes_read=9115 bytes_retransmit=9 bytes_invalid=0 send_seq=302 receive_seq=302 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002977 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.79 cputime=6.123 memavail=747584 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5068.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3505 bytes_read=9236 bytes_retransmit=9 bytes_invalid=0 send_seq=303 receive_seq=303 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002981 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.79 cputime=6.147 memavail=747332 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5069.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3511 bytes_read=9342 bytes_retransmit=9 bytes_invalid=0 send_seq=304 receive_seq=304 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002977 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.79 cputime=6.172 memavail=747332 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5070.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3517 bytes_read=9463 bytes_retransmit=9 bytes_invalid=0 send_seq=305 receive_seq=305 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002970 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.81 cputime=6.197 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5071.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3523 bytes_read=9584 bytes_retransmit=9 bytes_invalid=0 send_seq=306 receive_seq=306 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002964 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=2.81 cputime=6.221 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5072.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3529 bytes_read=9704 bytes_retransmit=9 bytes_invalid=0 send_seq=307 receive_seq=307 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002956 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=2.81 cputime=6.246 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5073.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3535 bytes_read=9825 bytes_retransmit=9 bytes_invalid=0 send_seq=308 receive_seq=308 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002947 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=2.81 cputime=6.270 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5074.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3541 bytes_read=9946 bytes_retransmit=9 bytes_invalid=0 send_seq=309 receive_seq=309 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002953 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.81 cputime=6.294 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5075.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3547 bytes_read=10052 bytes_retransmit=9 bytes_invalid=0 send_seq=310 receive_seq=310 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002939 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.82 cputime=6.320 memavail=747080 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5076.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3553 bytes_read=10173 bytes_retransmit=9 bytes_invalid=0 send_seq=311 receive_seq=311 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002934 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.82 cputime=6.346 memavail=747352 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5077.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3559 bytes_read=10308 bytes_retransmit=9 bytes_invalid=0 send_seq=312 receive_seq=312 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002937 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=2.82 cputime=6.371 memavail=747352 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5078.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3565 bytes_read=10414 bytes_retransmit=9 bytes_invalid=0 send_seq=313 receive_seq=313 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002931 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=2.82 cputime=6.399 memavail=747352 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5079.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3571 bytes_read=10535 bytes_retransmit=9 bytes_invalid=0 send_seq=314 receive_seq=314 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002936 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=2.82 cputime=6.426 memavail=747352 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5080.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3577 bytes_read=10656 bytes_retransmit=9 bytes_invalid=0 send_seq=315 receive_seq=315 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002936 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=2.84 cputime=6.450 memavail=747352 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5081.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3583 bytes_read=10777 bytes_retransmit=9 bytes_invalid=0 send_seq=316 receive_seq=316 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002945 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.84 cputime=6.475 memavail=747108 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5082.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3589 bytes_read=10897 bytes_retransmit=9 bytes_invalid=0 send_seq=317 receive_seq=317 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002941 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.84 cputime=6.500 memavail=747108 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5083.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3595 bytes_read=11018 bytes_retransmit=9 bytes_invalid=0 send_seq=318 receive_seq=318 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002931 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.84 cputime=6.525 memavail=747108 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5084.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3601 bytes_read=11139 bytes_retransmit=9 bytes_invalid=0 send_seq=319 receive_seq=319 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002927 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=2.84 cputime=6.549 memavail=747108 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5085.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3607 bytes_read=11245 bytes_retransmit=9 bytes_invalid=0 send_seq=320 receive_seq=320 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002919 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=2.85 cputime=6.574 memavail=747108 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5086.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3613 bytes_read=11366 bytes_retransmit=9 bytes_invalid=0 send_seq=321 receive_seq=321 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002915 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=2.85 cputime=6.599 memavail=747112 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5087.4: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3619 bytes_read=11501 bytes_retransmit=9 bytes_invalid=0 send_seq=322 receive_seq=322 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002915 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.85 cputime=6.624 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5088.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3625 bytes_read=11622 bytes_retransmit=9 bytes_invalid=0 send_seq=323 receive_seq=323 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002908 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.85 cputime=6.650 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5089.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3631 bytes_read=11724 bytes_retransmit=9 bytes_invalid=0 send_seq=324 receive_seq=324 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002904 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.85 cputime=6.675 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5090.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3637 bytes_read=11837 bytes_retransmit=9 bytes_invalid=0 send_seq=325 receive_seq=325 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002910 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.78 cputime=6.700 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5091.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3643 bytes_read=11958 bytes_retransmit=9 bytes_invalid=0 send_seq=326 receive_seq=326 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002916 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.78 cputime=6.725 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5092.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3649 bytes_read=12078 bytes_retransmit=9 bytes_invalid=0 send_seq=327 receive_seq=327 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002921 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.78 cputime=6.750 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5093.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3655 bytes_read=12199 bytes_retransmit=9 bytes_invalid=0 send_seq=328 receive_seq=328 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002924 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.78 cputime=6.776 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5094.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3661 bytes_read=12320 bytes_retransmit=9 bytes_invalid=0 send_seq=329 receive_seq=329 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002931 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.78 cputime=6.802 memavail=747116 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5095.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3667 bytes_read=12426 bytes_retransmit=9 bytes_invalid=0 send_seq=330 receive_seq=330 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002934 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.56 cputime=6.827 memavail=747120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5096.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3673 bytes_read=12547 bytes_retransmit=9 bytes_invalid=0 send_seq=331 receive_seq=331 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002952 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.56 cputime=6.853 memavail=747124 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 5097.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3679 bytes_read=12682 bytes_retransmit=9 bytes_invalid=0 send_seq=332 receive_seq=332 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002967 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.56 cputime=6.878 memavail=746872 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5098.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3685 bytes_read=12788 bytes_retransmit=9 bytes_invalid=0 send_seq=333 receive_seq=333 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002961 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.56 cputime=6.901 memavail=746880 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5099.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3691 bytes_read=12909 bytes_retransmit=9 bytes_invalid=0 send_seq=334 receive_seq=334 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002954 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.56 cputime=6.926 memavail=746896 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5100.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3697 bytes_read=13030 bytes_retransmit=9 bytes_invalid=0 send_seq=335 receive_seq=335 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002946 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.35 cputime=6.944 memavail=746880 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5101.5: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3703 bytes_read=13136 bytes_retransmit=9 bytes_invalid=0 send_seq=336 receive_seq=336 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002943 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.35 cputime=6.963 memavail=746880 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 12:42:44 2023 (1675964564.9 34.9) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder Stats 39.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3355 bytes_read=6437 bytes_retransmit=9 bytes_invalid=0 send_seq=278 receive_seq=278 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179987827 heater_bed: target=0 temp=0.0 pwm=0.000 sysload=1.41 cputime=2.961 memavail=781368 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 Stats 40.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3361 bytes_read=6468 bytes_retransmit=9 bytes_invalid=0 send_seq=279 receive_seq=279 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179998005 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=1.41 cputime=2.966 memavail=779132 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 webhooks client 1971466448: New connection webhooks client 1971466448: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} webhooks: registering remote method 'shutdown_machine' for connection id: 1971466448 webhooks: registering remote method 'reboot_machine' for connection id: 1971466448 webhooks: registering remote method 'pause_job_queue' for connection id: 1971466448 webhooks: registering remote method 'start_job_queue' for connection id: 1971466448 Stats 41.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3367 bytes_read=6604 bytes_retransmit=9 bytes_invalid=0 send_seq=280 receive_seq=280 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180001161 heater_bed: target=0 temp=20.3 pwm=0.000 sysload=1.62 cputime=3.005 memavail=774532 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 42.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3373 bytes_read=6710 bytes_retransmit=9 bytes_invalid=0 send_seq=281 receive_seq=281 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002124 heater_bed: target=0 temp=20.4 pwm=0.000 sysload=1.62 cputime=3.018 memavail=771100 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 43.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3379 bytes_read=6830 bytes_retransmit=9 bytes_invalid=0 send_seq=282 receive_seq=282 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002582 heater_bed: target=0 temp=20.4 pwm=0.000 sysload=1.62 cputime=3.029 memavail=765516 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 44.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3385 bytes_read=6943 bytes_retransmit=9 bytes_invalid=0 send_seq=283 receive_seq=283 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002727 heater_bed: target=0 temp=20.5 pwm=0.000 sysload=1.62 cputime=3.041 memavail=764592 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 45.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3391 bytes_read=7046 bytes_retransmit=9 bytes_invalid=0 send_seq=284 receive_seq=284 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002887 heater_bed: target=0 temp=20.4 pwm=0.000 sysload=1.62 cputime=3.052 memavail=762384 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 46.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3397 bytes_read=7181 bytes_retransmit=9 bytes_invalid=0 send_seq=285 receive_seq=285 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002770 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=1.89 cputime=3.062 memavail=760568 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 47.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3403 bytes_read=7302 bytes_retransmit=9 bytes_invalid=0 send_seq=286 receive_seq=286 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002826 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=1.89 cputime=3.072 memavail=758888 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 48.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3409 bytes_read=7408 bytes_retransmit=9 bytes_invalid=0 send_seq=287 receive_seq=287 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002837 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=1.89 cputime=3.082 memavail=757584 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 49.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3415 bytes_read=7529 bytes_retransmit=9 bytes_invalid=0 send_seq=288 receive_seq=288 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002831 heater_bed: target=0 temp=20.7 pwm=0.000 sysload=1.89 cputime=3.093 memavail=755572 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.3 pwm=0.000 Stats 50.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3421 bytes_read=7650 bytes_retransmit=9 bytes_invalid=0 send_seq=289 receive_seq=289 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002788 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=1.89 cputime=3.104 memavail=752432 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 51.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3427 bytes_read=7770 bytes_retransmit=9 bytes_invalid=0 send_seq=290 receive_seq=290 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002822 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=2.06 cputime=3.144 memavail=750920 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 52.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3433 bytes_read=7891 bytes_retransmit=9 bytes_invalid=0 send_seq=291 receive_seq=291 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002869 heater_bed: target=0 temp=20.7 pwm=0.000 sysload=2.06 cputime=3.183 memavail=750776 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 53.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3439 bytes_read=8012 bytes_retransmit=9 bytes_invalid=0 send_seq=292 receive_seq=292 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002836 heater_bed: target=0 temp=20.7 pwm=0.000 sysload=2.06 cputime=3.199 memavail=750128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.1 pwm=0.000 Stats 54.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3445 bytes_read=8118 bytes_retransmit=9 bytes_invalid=0 send_seq=293 receive_seq=293 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002867 heater_bed: target=0 temp=20.8 pwm=0.000 sysload=2.06 cputime=3.217 memavail=749892 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Stats 55.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3451 bytes_read=8239 bytes_retransmit=9 bytes_invalid=0 send_seq=294 receive_seq=294 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002897 heater_bed: target=0 temp=20.8 pwm=0.000 sysload=2.06 cputime=3.234 memavail=749876 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=20.2 pwm=0.000 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 13:14:21 2023 (1675966461.7 1455.1) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1967633432: New connection webhooks client 1967633432: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} mcu 'mcu': got {'#receive_time': 1457.05660986, u'next_clock': 1116594944, u'oid': 22, u'value': 31563, '#name': u'analog_in_state', '#sent_time': 1457.053430537} mcu 'mcu': got {'#receive_time': 1457.166982152, u'next_clock': 1136394944, u'oid': 33, u'value': 31552, '#name': u'analog_in_state', '#sent_time': 1457.156948194} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder webhooks: registering remote method 'shutdown_machine' for connection id: 1967633432 webhooks: registering remote method 'reboot_machine' for connection id: 1967633432 webhooks: registering remote method 'pause_job_queue' for connection id: 1967633432 webhooks: registering remote method 'start_job_queue' for connection id: 1967633432 Stats 1595.1: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3919 bytes_read=22540 bytes_retransmit=9 bytes_invalid=0 send_seq=395 receive_seq=395 retransmit_seq=17 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002881 heater_bed: target=0 temp=20.6 pwm=0.000 sysload=2.21 cputime=5.065 memavail=746676 print_time=1600.125 buffer_time=0.689 print_stall=0 extruder: target=0 temp=20.6 pwm=0.000 Attempting MCU 'mcu' reset command webhooks client 1967633432: Disconnected Restarting printer Start printer at Thu Feb 9 13:16:43 2023 (1675966603.5 1596.9) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968020256: New connection webhooks client 1968020256: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 13:17:20 2023 (1675966640.6 27.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' webhooks client 1970359112: New connection webhooks client 1970359112: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-246-g9c417278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 14:09:04 2023 (1675969744.1 883.3) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1967806624: New connection webhooks client 1967806624: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Attempting MCU 'mcu' reset command Unable to issue reset command on MCU 'rpi' webhooks client 1967806624: Disconnected Restarting printer Start printer at Thu Feb 9 14:10:47 2023 (1675969847.1 986.4) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1967726424: New connection webhooks client 1967726424: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Attempting MCU 'mcu' reset command Unable to issue reset command on MCU 'rpi' webhooks client 1967726424: Disconnected Restarting printer Start printer at Thu Feb 9 14:17:09 2023 (1675970229.3 1368.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968349016: New connection webhooks client 1968349016: Client info {'program': 'Moonraker', 'version': 'v0.7.1-451-gefeea0d'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 158, in _connect % (mcu_name.split()[-1], mcu_version)) File "/home/pi/klipper/klippy/klippy.py", line 248, in send_event self.in_shutdown_state = True File "/home/pi/klipper/klippy/mcu.py", line 779, in _mcu_identify self._serial.connect_pipe(self._serialport) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.11.0-101-g17f7c039' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Building C code module c_helper.so Start printer at Thu Feb 9 14:21:46 2023 (1675970506.1 52.1) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968927568: New connection webhooks client 1968927568: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 176, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 263, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 782, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Attempting MCU 'mcu' reset command Unable to issue reset command on MCU 'rpi' webhooks client 1968927568: Disconnected Restarting printer Start printer at Thu Feb 9 14:27:57 2023 (1675970877.7 423.7) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968163376: New connection webhooks client 1968163376: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' mcu 'rpi': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu' MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 176, in _connect self.send_event("klippy:mcu_identify") File "/home/pi/klipper/klippy/klippy.py", line 263, in send_event return [cb(*params) for cb in self.event_handlers.get(event, [])] File "/home/pi/klipper/klippy/mcu.py", line 782, in _mcu_identify raise error(str(e)) error: mcu 'rpi': Unable to connect Build file /home/pi/klipper/klippy/../.config(649): Thu Feb 9 11:36:56 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(8462): Thu Feb 9 11:37:46 2023 Last MCU build version: v0.10.0-246-g9c417278 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(534028): Thu Feb 9 11:37:57 2023 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.11.0-101-g17f7c039' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 14:32:50 2023 (1675971170.3 716.3) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968667504: New connection webhooks client 1968667504: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=1110767275 clock_est=(718.868 1093557210 49994825.775) min_half_rtt=0.000068 min_rtt_time=718.902 time_avg=718.868(0.017) clock_avg=1093557210.655(865586.133) pred_variance=1843050422.115 clock_adj=(272.990 49995260.500) Dumping serial stats: bytes_write=809 bytes_read=4458 bytes_retransmit=0 bytes_invalid=0 send_seq=110 receive_seq=110 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 95 messages Sent 0 718.597838 718.597838 8: seq: 10, identify offset=0 count=40 Sent 1 718.598877 718.598877 8: seq: 11, identify offset=40 count=40 Sent 2 718.599477 718.599477 8: seq: 12, identify offset=80 count=40 Sent 3 718.600057 718.600057 9: seq: 13, identify offset=120 count=40 Sent 4 718.600601 718.600601 9: seq: 14, identify offset=160 count=40 Sent 5 718.601169 718.601169 9: seq: 15, identify offset=200 count=40 Sent 6 718.601708 718.601708 9: seq: 16, identify offset=240 count=40 Sent 7 718.602264 718.602264 9: seq: 17, identify offset=280 count=40 Sent 8 718.602814 718.602814 9: seq: 18, identify offset=320 count=40 Sent 9 718.603362 718.603362 9: seq: 19, identify offset=360 count=40 Sent 10 718.603969 718.603969 9: seq: 1a, identify offset=400 count=40 Sent 11 718.604509 718.604509 9: seq: 1b, identify offset=440 count=40 Sent 12 718.605067 718.605067 9: seq: 1c, identify offset=480 count=40 Sent 13 718.605598 718.605598 9: seq: 1d, identify offset=520 count=40 Sent 14 718.606154 718.606154 9: seq: 1e, identify offset=560 count=40 Sent 15 718.606695 718.606695 9: seq: 1f, identify offset=600 count=40 Sent 16 718.607482 718.607482 9: seq: 10, identify offset=640 count=40 Sent 17 718.608064 718.608064 9: seq: 11, identify offset=680 count=40 Sent 18 718.608628 718.608628 9: seq: 12, identify offset=720 count=40 Sent 19 718.609167 718.609167 9: seq: 13, identify offset=760 count=40 Sent 20 718.609724 718.609724 9: seq: 14, identify offset=800 count=40 Sent 21 718.610267 718.610267 9: seq: 15, identify offset=840 count=40 Sent 22 718.610797 718.610797 9: seq: 16, identify offset=880 count=40 Sent 23 718.611349 718.611349 9: seq: 17, identify offset=920 count=40 Sent 24 718.611908 718.611908 9: seq: 18, identify offset=960 count=40 Sent 25 718.612474 718.612474 9: seq: 19, identify offset=1000 count=40 Sent 26 718.613019 718.613019 9: seq: 1a, identify offset=1040 count=40 Sent 27 718.613591 718.613591 9: seq: 1b, identify offset=1080 count=40 Sent 28 718.614158 718.614158 9: seq: 1c, identify offset=1120 count=40 Sent 29 718.614797 718.614797 9: seq: 1d, identify offset=1160 count=40 Sent 30 718.615810 718.615810 9: seq: 1e, identify offset=1200 count=40 Sent 31 718.616653 718.616653 9: seq: 1f, identify offset=1240 count=40 Sent 32 718.617274 718.617274 9: seq: 10, identify offset=1280 count=40 Sent 33 718.617936 718.617936 9: seq: 11, identify offset=1320 count=40 Sent 34 718.618517 718.618517 9: seq: 12, identify offset=1360 count=40 Sent 35 718.619186 718.619186 9: seq: 13, identify offset=1400 count=40 Sent 36 718.619841 718.619841 9: seq: 14, identify offset=1440 count=40 Sent 37 718.620855 718.620855 9: seq: 15, identify offset=1480 count=40 Sent 38 718.621786 718.621786 9: seq: 16, identify offset=1520 count=40 Sent 39 718.622684 718.622684 9: seq: 17, identify offset=1560 count=40 Sent 40 718.623617 718.623617 9: seq: 18, identify offset=1600 count=40 Sent 41 718.624528 718.624528 9: seq: 19, identify offset=1640 count=40 Sent 42 718.625412 718.625412 9: seq: 1a, identify offset=1680 count=40 Sent 43 718.626375 718.626375 9: seq: 1b, identify offset=1720 count=40 Sent 44 718.630095 718.630095 9: seq: 1c, identify offset=1760 count=40 Sent 45 718.631139 718.631139 9: seq: 1d, identify offset=1800 count=40 Sent 46 718.632076 718.632076 9: seq: 1e, identify offset=1840 count=40 Sent 47 718.632991 718.632991 9: seq: 1f, identify offset=1880 count=40 Sent 48 718.633922 718.633922 9: seq: 10, identify offset=1920 count=40 Sent 49 718.634867 718.634867 9: seq: 11, identify offset=1960 count=40 Sent 50 718.635784 718.635784 9: seq: 12, identify offset=2000 count=40 Sent 51 718.636681 718.636681 9: seq: 13, identify offset=2040 count=40 Sent 52 718.637664 718.637664 9: seq: 14, identify offset=2080 count=40 Sent 53 718.638844 718.638844 9: seq: 15, identify offset=2120 count=40 Sent 54 718.639802 718.639802 9: seq: 16, identify offset=2160 count=40 Sent 55 718.640700 718.640700 9: seq: 17, identify offset=2200 count=40 Sent 56 718.641792 718.641792 9: seq: 18, identify offset=2240 count=40 Sent 57 718.642778 718.642778 9: seq: 19, identify offset=2280 count=40 Sent 58 718.643766 718.643766 9: seq: 1a, identify offset=2320 count=40 Sent 59 718.645030 718.645030 9: seq: 1b, identify offset=2360 count=40 Sent 60 718.645992 718.645992 9: seq: 1c, identify offset=2400 count=40 Sent 61 718.646961 718.646961 9: seq: 1d, identify offset=2440 count=40 Sent 62 718.647877 718.647877 9: seq: 1e, identify offset=2480 count=40 Sent 63 718.649067 718.649067 9: seq: 1f, identify offset=2520 count=40 Sent 64 718.650042 718.650042 9: seq: 10, identify offset=2560 count=40 Sent 65 718.651056 718.651056 9: seq: 11, identify offset=2600 count=40 Sent 66 718.655550 718.655550 9: seq: 12, identify offset=2640 count=40 Sent 67 718.656722 718.656722 9: seq: 13, identify offset=2680 count=40 Sent 68 718.657837 718.657837 9: seq: 14, identify offset=2720 count=40 Sent 69 718.658821 718.658821 9: seq: 15, identify offset=2760 count=40 Sent 70 718.659767 718.659767 9: seq: 16, identify offset=2800 count=40 Sent 71 718.660663 718.660663 9: seq: 17, identify offset=2840 count=40 Sent 72 718.661563 718.661563 9: seq: 18, identify offset=2880 count=40 Sent 73 718.662591 718.662591 9: seq: 19, identify offset=2920 count=40 Sent 74 718.663539 718.663539 9: seq: 1a, identify offset=2960 count=40 Sent 75 718.664435 718.664435 9: seq: 1b, identify offset=3000 count=40 Sent 76 718.665342 718.665342 9: seq: 1c, identify offset=3040 count=40 Sent 77 718.666285 718.666285 9: seq: 1d, identify offset=3080 count=40 Sent 78 718.667270 718.667270 9: seq: 1e, identify offset=3095 count=40 Sent 79 718.798940 718.798940 6: seq: 1f, get_uptime Sent 80 718.850830 718.850830 6: seq: 10, get_clock Sent 81 718.901816 718.901816 6: seq: 11, get_clock Sent 82 718.953119 718.953119 6: seq: 12, get_clock Sent 83 719.004212 719.004212 6: seq: 13, get_clock Sent 84 719.055333 719.055333 6: seq: 14, get_clock Sent 85 719.106588 719.106588 6: seq: 15, get_clock Sent 86 719.157640 719.157640 6: seq: 16, get_clock Sent 87 719.209040 719.209040 6: seq: 17, get_clock Sent 88 719.212047 719.212047 6: seq: 18, get_clock Sent 89 719.235730 719.235730 6: seq: 19, get_config Sent 90 719.237750 719.237750 7: seq: 1a, allocate_oids count=2 Sent 91 719.237790 719.237790 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 719.238043 719.238043 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 719.238217 719.238217 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 719.240499 719.240499 11: seq: 1e, finalize_config crc=4031677248 Dumping receive queue 96 messages Receive: 0 718.596166 0.000000 6: seq: 10, starting Receive: 1 718.596170 0.000000 13: seq: 10, stats count=51 sum=14856 sumsq=62755 Receive: 2 718.596171 0.000000 13: seq: 10, stats count=50 sum=13552 sumsq=40136 Receive: 3 718.596172 0.000000 12: seq: 10, stats count=51 sum=11987 sumsq=24608 Receive: 4 718.596173 0.000000 13: seq: 10, stats count=51 sum=15182 sumsq=43018 Receive: 5 718.598018 718.597838 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 6 718.599004 718.598877 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 7 718.599608 718.599477 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 8 718.600174 718.600057 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 9 718.600715 718.600601 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 10 718.601287 718.601169 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 11 718.601822 718.601708 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 12 718.602390 718.602264 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 13 718.602931 718.602814 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 14 718.603516 718.603362 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 15 718.604082 718.603969 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 16 718.604629 718.604509 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 17 718.605178 718.605067 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 18 718.605710 718.605598 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 19 718.606270 718.606154 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 20 718.606847 718.606695 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 21 718.607612 718.607482 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 22 718.608177 718.608064 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 23 718.608741 718.608628 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 24 718.609276 718.609167 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 25 718.609839 718.609724 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 26 718.610378 718.610267 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 27 718.610905 718.610797 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 28 718.611463 718.611349 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 29 718.612022 718.611908 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 30 718.612590 718.612474 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 31 718.613132 718.613019 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 32 718.613724 718.613591 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 33 718.614275 718.614158 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 34 718.614929 718.614797 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 35 718.615938 718.615810 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 36 718.616767 718.616653 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 37 718.617391 718.617274 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 38 718.618061 718.617936 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 39 718.618640 718.618517 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 40 718.619303 718.619186 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 41 718.620036 718.619841 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 42 718.621066 718.620855 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 43 718.621972 718.621786 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 44 718.622875 718.622684 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 45 718.623806 718.623617 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 46 718.624712 718.624528 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 47 718.625606 718.625412 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 48 718.626563 718.626375 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 49 718.630331 718.630095 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 50 718.631357 718.631139 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 51 718.632280 718.632076 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 52 718.633178 718.632991 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 53 718.634112 718.633922 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 54 718.635059 718.634867 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 55 718.635970 718.635784 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 56 718.636909 718.636681 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 57 718.637851 718.637664 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 58 718.639047 718.638844 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 59 718.639991 718.639802 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 60 718.640906 718.640700 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 61 718.642006 718.641792 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 62 718.642979 718.642778 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 63 718.643956 718.643766 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 64 718.645230 718.645030 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 65 718.646196 718.645992 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 66 718.647160 718.646961 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 67 718.648070 718.647877 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 68 718.649262 718.649067 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 69 718.650261 718.650042 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 70 718.652765 718.651056 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 71 718.655814 718.655550 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 72 718.656977 718.656722 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 73 718.658040 718.657837 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 74 718.659013 718.658821 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 75 718.659952 718.659767 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 76 718.660854 718.660663 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 77 718.661751 718.661563 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968297984: New connection webhooks client 1968297984: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=154673430 clock_est=(785.746 137467120 49995981.244) min_half_rtt=0.000068 min_rtt_time=785.934 time_avg=785.746(0.017) clock_avg=137467120.368(867791.369) pred_variance=1843462594.884 clock_adj=(-0.595 49992905.750) Dumping serial stats: bytes_write=821 bytes_read=4418 bytes_retransmit=0 bytes_invalid=0 send_seq=111 receive_seq=111 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 95 messages Sent 0 785.485956 785.485956 8: seq: 10, identify offset=0 count=40 Sent 1 785.487821 785.487821 8: seq: 11, identify offset=40 count=40 Sent 2 785.488827 785.488827 8: seq: 12, identify offset=80 count=40 Sent 3 785.489757 785.489757 9: seq: 13, identify offset=120 count=40 Sent 4 785.490715 785.490715 9: seq: 14, identify offset=160 count=40 Sent 5 785.491741 785.491741 9: seq: 15, identify offset=200 count=40 Sent 6 785.492695 785.492695 9: seq: 16, identify offset=240 count=40 Sent 7 785.493619 785.493619 9: seq: 17, identify offset=280 count=40 Sent 8 785.494566 785.494566 9: seq: 18, identify offset=320 count=40 Sent 9 785.495493 785.495493 9: seq: 19, identify offset=360 count=40 Sent 10 785.496390 785.496390 9: seq: 1a, identify offset=400 count=40 Sent 11 785.497714 785.497714 9: seq: 1b, identify offset=440 count=40 Sent 12 785.498690 785.498690 9: seq: 1c, identify offset=480 count=40 Sent 13 785.499610 785.499610 9: seq: 1d, identify offset=520 count=40 Sent 14 785.500535 785.500535 9: seq: 1e, identify offset=560 count=40 Sent 15 785.501417 785.501417 9: seq: 1f, identify offset=600 count=40 Sent 16 785.502297 785.502297 9: seq: 10, identify offset=640 count=40 Sent 17 785.503223 785.503223 9: seq: 11, identify offset=680 count=40 Sent 18 785.504107 785.504107 9: seq: 12, identify offset=720 count=40 Sent 19 785.505000 785.505000 9: seq: 13, identify offset=760 count=40 Sent 20 785.505904 785.505904 9: seq: 14, identify offset=800 count=40 Sent 21 785.506809 785.506809 9: seq: 15, identify offset=840 count=40 Sent 22 785.508114 785.508114 9: seq: 16, identify offset=880 count=40 Sent 23 785.509137 785.509137 9: seq: 17, identify offset=920 count=40 Sent 24 785.510074 785.510074 9: seq: 18, identify offset=960 count=40 Sent 25 785.510989 785.510989 9: seq: 19, identify offset=1000 count=40 Sent 26 785.511932 785.511932 9: seq: 1a, identify offset=1040 count=40 Sent 27 785.512815 785.512815 9: seq: 1b, identify offset=1080 count=40 Sent 28 785.513722 785.513722 9: seq: 1c, identify offset=1120 count=40 Sent 29 785.514642 785.514642 9: seq: 1d, identify offset=1160 count=40 Sent 30 785.515556 785.515556 9: seq: 1e, identify offset=1200 count=40 Sent 31 785.516453 785.516453 9: seq: 1f, identify offset=1240 count=40 Sent 32 785.517681 785.517681 9: seq: 10, identify offset=1280 count=40 Sent 33 785.518633 785.518633 9: seq: 11, identify offset=1320 count=40 Sent 34 785.519569 785.519569 9: seq: 12, identify offset=1360 count=40 Sent 35 785.520504 785.520504 9: seq: 13, identify offset=1400 count=40 Sent 36 785.521394 785.521394 9: seq: 14, identify offset=1440 count=40 Sent 37 785.522289 785.522289 9: seq: 15, identify offset=1480 count=40 Sent 38 785.523226 785.523226 9: seq: 16, identify offset=1520 count=40 Sent 39 785.524158 785.524158 9: seq: 17, identify offset=1560 count=40 Sent 40 785.525048 785.525048 9: seq: 18, identify offset=1600 count=40 Sent 41 785.525944 785.525944 9: seq: 19, identify offset=1640 count=40 Sent 42 785.527447 785.527447 9: seq: 1a, identify offset=1680 count=40 Sent 43 785.528433 785.528433 9: seq: 1b, identify offset=1720 count=40 Sent 44 785.529379 785.529379 9: seq: 1c, identify offset=1760 count=40 Sent 45 785.530269 785.530269 9: seq: 1d, identify offset=1800 count=40 Sent 46 785.531152 785.531152 9: seq: 1e, identify offset=1840 count=40 Sent 47 785.532079 785.532079 9: seq: 1f, identify offset=1880 count=40 Sent 48 785.532993 785.532993 9: seq: 10, identify offset=1920 count=40 Sent 49 785.533895 785.533895 9: seq: 11, identify offset=1960 count=40 Sent 50 785.534887 785.534887 9: seq: 12, identify offset=2000 count=40 Sent 51 785.536132 785.536132 9: seq: 13, identify offset=2040 count=40 Sent 52 785.538936 785.538936 9: seq: 14, identify offset=2080 count=40 Sent 53 785.540231 785.540231 9: seq: 15, identify offset=2120 count=40 Sent 54 785.541251 785.541251 9: seq: 16, identify offset=2160 count=40 Sent 55 785.542189 785.542189 9: seq: 17, identify offset=2200 count=40 Sent 56 785.543130 785.543130 9: seq: 18, identify offset=2240 count=40 Sent 57 785.544381 785.544381 9: seq: 19, identify offset=2280 count=40 Sent 58 785.545298 785.545298 9: seq: 1a, identify offset=2320 count=40 Sent 59 785.546186 785.546186 9: seq: 1b, identify offset=2360 count=40 Sent 60 785.547410 785.547410 9: seq: 1c, identify offset=2400 count=40 Sent 61 785.548414 785.548414 9: seq: 1d, identify offset=2440 count=40 Sent 62 785.549369 785.549369 9: seq: 1e, identify offset=2480 count=40 Sent 63 785.550263 785.550263 9: seq: 1f, identify offset=2520 count=40 Sent 64 785.551154 785.551154 9: seq: 10, identify offset=2560 count=40 Sent 65 785.552087 785.552087 9: seq: 11, identify offset=2600 count=40 Sent 66 785.553010 785.553010 9: seq: 12, identify offset=2640 count=40 Sent 67 785.553897 785.553897 9: seq: 13, identify offset=2680 count=40 Sent 68 785.554785 785.554785 9: seq: 14, identify offset=2720 count=40 Sent 69 785.555744 785.555744 9: seq: 15, identify offset=2760 count=40 Sent 70 785.556658 785.556658 9: seq: 16, identify offset=2800 count=40 Sent 71 785.557877 785.557877 9: seq: 17, identify offset=2840 count=40 Sent 72 785.558827 785.558827 9: seq: 18, identify offset=2880 count=40 Sent 73 785.559744 785.559744 9: seq: 19, identify offset=2920 count=40 Sent 74 785.560686 785.560686 9: seq: 1a, identify offset=2960 count=40 Sent 75 785.561758 785.561758 9: seq: 1b, identify offset=3000 count=40 Sent 76 785.562670 785.562670 9: seq: 1c, identify offset=3040 count=40 Sent 77 785.563591 785.563591 9: seq: 1d, identify offset=3080 count=40 Sent 78 785.564543 785.564543 9: seq: 1e, identify offset=3095 count=40 Sent 79 785.677013 785.677013 6: seq: 1f, get_uptime Sent 80 785.730006 785.730006 6: seq: 10, get_clock Sent 81 785.780936 785.780936 6: seq: 11, get_clock Sent 82 785.832264 785.832264 6: seq: 12, get_clock Sent 83 785.883239 785.883239 6: seq: 13, get_clock Sent 84 785.934170 785.934170 6: seq: 14, get_clock Sent 85 785.985048 785.985048 6: seq: 15, get_clock Sent 86 786.036059 786.036059 6: seq: 16, get_clock Sent 87 786.087525 786.087525 6: seq: 17, get_clock Sent 88 786.090171 786.090171 6: seq: 18, get_clock Sent 89 786.115339 786.115339 6: seq: 19, get_config Sent 90 786.117096 786.117096 7: seq: 1a, allocate_oids count=2 Sent 91 786.117456 786.117456 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 786.117622 786.117622 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 786.117809 786.117809 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 786.119809 786.119809 12: seq: 1e, finalize_config crc=4031677248, get_config Dumping receive queue 92 messages Receive: 0 785.484285 0.000000 6: seq: 10, starting Receive: 1 785.486216 785.485956 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 785.488073 785.487821 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 785.489032 785.488827 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 785.489960 785.489757 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 785.490915 785.490715 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 785.491951 785.491741 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 785.492912 785.492695 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 785.493818 785.493619 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 785.494768 785.494566 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 785.495694 785.495493 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 785.496584 785.496390 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 785.497940 785.497714 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 785.498865 785.498690 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 785.499799 785.499610 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 785.500712 785.500535 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 785.501590 785.501417 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 785.502472 785.502297 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 785.503398 785.503223 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 785.504301 785.504107 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 785.505174 785.505000 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 785.506079 785.505904 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 785.507137 785.506809 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 785.508307 785.508114 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 785.509327 785.509137 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 785.510259 785.510074 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 785.511168 785.510989 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 785.512109 785.511932 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 785.513009 785.512815 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 785.513904 785.513722 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 785.514822 785.514642 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 785.515740 785.515556 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 785.516652 785.516453 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 785.517893 785.517681 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 785.518821 785.518633 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 785.519766 785.519569 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 785.520692 785.520504 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 785.521574 785.521394 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 785.522468 785.522289 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 785.523404 785.523226 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 785.524343 785.524158 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 785.525228 785.525048 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 785.526124 785.525944 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 785.527652 785.527447 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 785.528619 785.528433 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 785.529562 785.529379 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 785.530449 785.530269 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 785.531336 785.531152 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 785.532265 785.532079 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 785.533190 785.532993 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 785.534072 785.533895 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 785.535131 785.534887 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 785.536391 785.536132 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 785.539235 785.538936 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 785.540470 785.540231 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 785.541437 785.541251 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 785.542372 785.542189 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 785.543319 785.543130 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 785.544578 785.544381 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 785.545476 785.545298 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 785.546370 785.546186 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 785.547624 785.547410 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 785.548606 785.548414 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 785.549562 785.549369 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 785.550449 785.550263 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 785.551344 785.551154 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 785.552276 785.552087 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 785.553198 785.553010 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 785.554079 785.553897 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 785.554975 785.554785 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 785.555946 785.555744 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 785.556895 785.556658 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 785.558084 785.557877 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 785.559019 785.558827 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968593096: New connection webhooks client 1968593096: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=146753788 clock_est=(816.587 129532691 49992809.876) min_half_rtt=0.000071 min_rtt_time=816.725 time_avg=816.587(0.017) clock_avg=129532691.229(868713.938) pred_variance=1843437803.524 clock_adj=(-0.445 49991510.000) Dumping serial stats: bytes_write=820 bytes_read=4408 bytes_retransmit=0 bytes_invalid=0 send_seq=111 receive_seq=111 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 95 messages Sent 0 816.334532 816.334532 8: seq: 10, identify offset=0 count=40 Sent 1 816.336085 816.336085 8: seq: 11, identify offset=40 count=40 Sent 2 816.337109 816.337109 8: seq: 12, identify offset=80 count=40 Sent 3 816.338207 816.338207 9: seq: 13, identify offset=120 count=40 Sent 4 816.339154 816.339154 9: seq: 14, identify offset=160 count=40 Sent 5 816.340121 816.340121 9: seq: 15, identify offset=200 count=40 Sent 6 816.341017 816.341017 9: seq: 16, identify offset=240 count=40 Sent 7 816.341903 816.341903 9: seq: 17, identify offset=280 count=40 Sent 8 816.342825 816.342825 9: seq: 18, identify offset=320 count=40 Sent 9 816.343748 816.343748 9: seq: 19, identify offset=360 count=40 Sent 10 816.344660 816.344660 9: seq: 1a, identify offset=400 count=40 Sent 11 816.345547 816.345547 9: seq: 1b, identify offset=440 count=40 Sent 12 816.346484 816.346484 9: seq: 1c, identify offset=480 count=40 Sent 13 816.347484 816.347484 9: seq: 1d, identify offset=520 count=40 Sent 14 816.348499 816.348499 9: seq: 1e, identify offset=560 count=40 Sent 15 816.349411 816.349411 9: seq: 1f, identify offset=600 count=40 Sent 16 816.350332 816.350332 9: seq: 10, identify offset=640 count=40 Sent 17 816.351244 816.351244 9: seq: 11, identify offset=680 count=40 Sent 18 816.352476 816.352476 9: seq: 12, identify offset=720 count=40 Sent 19 816.353396 816.353396 9: seq: 13, identify offset=760 count=40 Sent 20 816.354287 816.354287 9: seq: 14, identify offset=800 count=40 Sent 21 816.355218 816.355218 9: seq: 15, identify offset=840 count=40 Sent 22 816.356145 816.356145 9: seq: 16, identify offset=880 count=40 Sent 23 816.357085 816.357085 9: seq: 17, identify offset=920 count=40 Sent 24 816.358034 816.358034 9: seq: 18, identify offset=960 count=40 Sent 25 816.359138 816.359138 9: seq: 19, identify offset=1000 count=40 Sent 26 816.360080 816.360080 9: seq: 1a, identify offset=1040 count=40 Sent 27 816.360974 816.360974 9: seq: 1b, identify offset=1080 count=40 Sent 28 816.361879 816.361879 9: seq: 1c, identify offset=1120 count=40 Sent 29 816.362817 816.362817 9: seq: 1d, identify offset=1160 count=40 Sent 30 816.363742 816.363742 9: seq: 1e, identify offset=1200 count=40 Sent 31 816.364649 816.364649 9: seq: 1f, identify offset=1240 count=40 Sent 32 816.365535 816.365535 9: seq: 10, identify offset=1280 count=40 Sent 33 816.366472 816.366472 9: seq: 11, identify offset=1320 count=40 Sent 34 816.367437 816.367437 9: seq: 12, identify offset=1360 count=40 Sent 35 816.368343 816.368343 9: seq: 13, identify offset=1400 count=40 Sent 36 816.370152 816.370152 9: seq: 14, identify offset=1440 count=40 Sent 37 816.371127 816.371127 9: seq: 15, identify offset=1480 count=40 Sent 38 816.372066 816.372066 9: seq: 16, identify offset=1520 count=40 Sent 39 816.372972 816.372972 9: seq: 17, identify offset=1560 count=40 Sent 40 816.373900 816.373900 9: seq: 18, identify offset=1600 count=40 Sent 41 816.374774 816.374774 9: seq: 19, identify offset=1640 count=40 Sent 42 816.375653 816.375653 9: seq: 1a, identify offset=1680 count=40 Sent 43 816.376575 816.376575 9: seq: 1b, identify offset=1720 count=40 Sent 44 816.377576 816.377576 9: seq: 1c, identify offset=1760 count=40 Sent 45 816.378481 816.378481 9: seq: 1d, identify offset=1800 count=40 Sent 46 816.379388 816.379388 9: seq: 1e, identify offset=1840 count=40 Sent 47 816.380323 816.380323 9: seq: 1f, identify offset=1880 count=40 Sent 48 816.381242 816.381242 9: seq: 10, identify offset=1920 count=40 Sent 49 816.382401 816.382401 9: seq: 11, identify offset=1960 count=40 Sent 50 816.384930 816.384930 9: seq: 12, identify offset=2000 count=40 Sent 51 816.386318 816.386318 9: seq: 13, identify offset=2040 count=40 Sent 52 816.387560 816.387560 9: seq: 14, identify offset=2080 count=40 Sent 53 816.388532 816.388532 9: seq: 15, identify offset=2120 count=40 Sent 54 816.389447 816.389447 9: seq: 16, identify offset=2160 count=40 Sent 55 816.390401 816.390401 9: seq: 17, identify offset=2200 count=40 Sent 56 816.391357 816.391357 9: seq: 18, identify offset=2240 count=40 Sent 57 816.392265 816.392265 9: seq: 19, identify offset=2280 count=40 Sent 58 816.393170 816.393170 9: seq: 1a, identify offset=2320 count=40 Sent 59 816.394120 816.394120 9: seq: 1b, identify offset=2360 count=40 Sent 60 816.395059 816.395059 9: seq: 1c, identify offset=2400 count=40 Sent 61 816.396002 816.396002 9: seq: 1d, identify offset=2440 count=40 Sent 62 816.397065 816.397065 9: seq: 1e, identify offset=2480 count=40 Sent 63 816.398010 816.398010 9: seq: 1f, identify offset=2520 count=40 Sent 64 816.398967 816.398967 9: seq: 10, identify offset=2560 count=40 Sent 65 816.399877 816.399877 9: seq: 11, identify offset=2600 count=40 Sent 66 816.400776 816.400776 9: seq: 12, identify offset=2640 count=40 Sent 67 816.401705 816.401705 9: seq: 13, identify offset=2680 count=40 Sent 68 816.402657 816.402657 9: seq: 14, identify offset=2720 count=40 Sent 69 816.403661 816.403661 9: seq: 15, identify offset=2760 count=40 Sent 70 816.404676 816.404676 9: seq: 16, identify offset=2800 count=40 Sent 71 816.405603 816.405603 9: seq: 17, identify offset=2840 count=40 Sent 72 816.406559 816.406559 9: seq: 18, identify offset=2880 count=40 Sent 73 816.407566 816.407566 9: seq: 19, identify offset=2920 count=40 Sent 74 816.408457 816.408457 9: seq: 1a, identify offset=2960 count=40 Sent 75 816.409363 816.409363 9: seq: 1b, identify offset=3000 count=40 Sent 76 816.410308 816.410308 9: seq: 1c, identify offset=3040 count=40 Sent 77 816.411229 816.411229 9: seq: 1d, identify offset=3080 count=40 Sent 78 816.412163 816.412163 9: seq: 1e, identify offset=3095 count=40 Sent 79 816.518266 816.518266 6: seq: 1f, get_uptime Sent 80 816.571339 816.571339 6: seq: 10, get_clock Sent 81 816.622294 816.622294 6: seq: 11, get_clock Sent 82 816.673625 816.673625 6: seq: 12, get_clock Sent 83 816.724596 816.724596 6: seq: 13, get_clock Sent 84 816.775560 816.775560 6: seq: 14, get_clock Sent 85 816.826571 816.826571 6: seq: 15, get_clock Sent 86 816.877518 816.877518 6: seq: 16, get_clock Sent 87 816.928795 816.928795 6: seq: 17, get_clock Sent 88 816.931798 816.931798 6: seq: 18, get_clock Sent 89 816.955469 816.955469 6: seq: 19, get_config Sent 90 816.957481 816.957481 7: seq: 1a, allocate_oids count=2 Sent 91 816.957792 816.957792 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 816.957988 816.957988 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 816.958179 816.958179 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 816.960469 816.960469 11: seq: 1e, finalize_config crc=4031677248 Dumping receive queue 92 messages Receive: 0 816.332742 0.000000 6: seq: 10, starting Receive: 1 816.334799 816.334532 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 816.336310 816.336085 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 816.337440 816.337109 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 816.338402 816.338207 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 816.339348 816.339154 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 816.340315 816.340121 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 816.341200 816.341017 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 816.342094 816.341903 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 816.343015 816.342825 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 816.343960 816.343748 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 816.344848 816.344660 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 816.345735 816.345547 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 816.346675 816.346484 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 816.347711 816.347484 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 816.348693 816.348499 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 816.349599 816.349411 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 816.350519 816.350332 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 816.351450 816.351244 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 816.352688 816.352476 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 816.353577 816.353396 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 816.354475 816.354287 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 816.355405 816.355218 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 816.356327 816.356145 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 816.357285 816.357085 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 816.358354 816.358034 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 816.359335 816.359138 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 816.360270 816.360080 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 816.361174 816.360974 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 816.362067 816.361879 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 816.363011 816.362817 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 816.363952 816.363742 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 816.364838 816.364649 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 816.365723 816.365535 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 816.366660 816.366472 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 816.367644 816.367437 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 816.368525 816.368343 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 816.370357 816.370152 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 816.371319 816.371127 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 816.372252 816.372066 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 816.373153 816.372972 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 816.374083 816.373900 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 816.374957 816.374774 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 816.375842 816.375653 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 816.376764 816.376575 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 816.377772 816.377576 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 816.378686 816.378481 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 816.379579 816.379388 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 816.380511 816.380323 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 816.381465 816.381242 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 816.382667 816.382401 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 816.385210 816.384930 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 816.386590 816.386318 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 816.387782 816.387560 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 816.388728 816.388532 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 816.389646 816.389447 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 816.390600 816.390401 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 816.391553 816.391357 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 816.392460 816.392265 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 816.393378 816.393170 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 816.394318 816.394120 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 816.395253 816.395059 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 816.396194 816.396002 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 816.397261 816.397065 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 816.398204 816.398010 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 816.399162 816.398967 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 816.400073 816.399877 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 816.400974 816.400776 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 816.401900 816.401705 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 816.402855 816.402657 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 816.403908 816.403661 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 816.404887 816.404676 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 816.405801 816.405603 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 816.406753 816.406559 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1971108120: New connection webhooks client 1971108120: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} mcu 'mcu': got {'#receive_time': 824.379368643, u'next_clock': 1841400000, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 824.372423852} mcu 'mcu': got {u'count': 299, '#receive_time': 824.442125362, u'sum': 321465, u'sumsq': 2336512, '#name': u'stats', '#sent_time': 824.423863904} mcu 'mcu': got {'#receive_time': 824.568778904, u'next_clock': 1875600000, u'oid': 22, u'value': 31525, '#name': u'analog_in_state', '#sent_time': 824.526797862} mcu 'mcu': got {'#receive_time': 824.679132706, u'next_clock': 1895400000, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 824.630870675} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'mcu': got {'#receive_time': 824.869740674, u'next_clock': 1929600000, u'oid': 22, u'value': 31524, '#name': u'analog_in_state', '#sent_time': 824.738917133} mcu 'mcu': got {'#receive_time': 824.979781352, u'next_clock': 1949400000, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 824.738917133} mcu 'mcu': got {'#receive_time': 825.168642601, u'next_clock': 1983600000, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 824.738917133} mcu 'mcu': got {'#receive_time': 825.278776039, u'next_clock': 2003400000, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 824.738917133} Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 180, in _connect cb() File "/home/pi/klipper/klippy/mcu.py", line 726, in _connect config_params = self._send_get_config() File "/home/pi/klipper/klippy/mcu.py", line 713, in _send_get_config self._name,)) error: Can not update MCU 'mcu' config as it is shutdown Build file /home/pi/klipper/klippy/../.config(680): Thu Feb 9 14:30:48 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_CANBUS_FREQUENCY=500000 CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(9213): Thu Feb 9 14:32:17 2023 Last MCU build version: v0.11.0-101-g17f7c039 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(582512): Thu Feb 9 14:32:29 2023 mcu 'mcu': got {'#receive_time': 825.46902458, u'next_clock': 2037600000, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 825.342532393} mcu 'mcu': got {'#receive_time': 825.57920833, u'next_clock': 2057400000, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 825.342532393} mcu 'mcu': got {'#receive_time': 825.769654164, u'next_clock': 2091600000, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 825.879657966, u'next_clock': 2111400000, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.069707132, u'next_clock': 2145600000, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.179815778, u'next_clock': 2165400000L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.36866432, u'next_clock': 2199600000L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.478833643, u'next_clock': 2219400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.668967705, u'next_clock': 2253600000L, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 825.724061872} mcu 'mcu': got {'#receive_time': 826.779237757, u'next_clock': 2273400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 826.969342392, u'next_clock': 2307600000L, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.079485205, u'next_clock': 2327400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.269601194, u'next_clock': 2361600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.379712549, u'next_clock': 2381400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.568610101, u'next_clock': 2415600000L, u'oid': 22, u'value': 31524, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.678729528, u'next_clock': 2435400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 826.708439476} mcu 'mcu': got {'#receive_time': 827.868958434, u'next_clock': 2469600000L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 827.979100882, u'next_clock': 2489400000L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 828.169224632, u'next_clock': 2523600000L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 828.279327444, u'next_clock': 2543400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 828.469474527, u'next_clock': 2577600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 828.579590413, u'next_clock': 2597400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 827.693310673} mcu 'mcu': got {'#receive_time': 828.76858109, u'next_clock': 2631600000L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 828.878712913, u'next_clock': 2651400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 829.069049735, u'next_clock': 2685600000L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 829.178954214, u'next_clock': 2705400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 829.369072131, u'next_clock': 2739600000L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 829.479274891, u'next_clock': 2759400000L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 828.678310621} mcu 'mcu': got {'#receive_time': 829.669578537, u'next_clock': 2793600000L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 829.779742131, u'next_clock': 2813400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 829.96861437, u'next_clock': 2847600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 830.078747339, u'next_clock': 2867400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 830.268844422, u'next_clock': 2901600000L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 830.378960777, u'next_clock': 2921400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 830.569109266, u'next_clock': 2955600000L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 829.662707912} mcu 'mcu': got {'#receive_time': 830.679332547, u'next_clock': 2975400000L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 830.869421922, u'next_clock': 3009600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 830.979609474, u'next_clock': 3029400000L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 831.169736766, u'next_clock': 3063600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 831.278570516, u'next_clock': 3083400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 831.468774734, u'next_clock': 3117600000L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 831.578858536, u'next_clock': 3137400000L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 830.647484579} mcu 'mcu': got {'#receive_time': 831.769075464, u'next_clock': 3171600000L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 831.87920937, u'next_clock': 3191400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 832.069340515, u'next_clock': 3225600000L, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 832.179469578, u'next_clock': 3245400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 832.369569005, u'next_clock': 3279600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 832.479701349, u'next_clock': 3299400000L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 831.632336297} mcu 'mcu': got {'#receive_time': 832.668688536, u'next_clock': 3333600000L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 832.778843953, u'next_clock': 3353400000L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 832.968967078, u'next_clock': 3387600000L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 833.079083588, u'next_clock': 3407400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 833.269203119, u'next_clock': 3441600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 833.379342755, u'next_clock': 3461400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 833.569471504, u'next_clock': 3495600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 832.616466349} mcu 'mcu': got {'#receive_time': 833.679691713, u'next_clock': 3515400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 833.868546921, u'next_clock': 3549600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 833.978710358, u'next_clock': 3569400000L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 834.168939056, u'next_clock': 3603600000L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 834.278984056, u'next_clock': 3623400000L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 834.469086556, u'next_clock': 3657600000L, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 834.579312546, u'next_clock': 3677400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 833.600510046} mcu 'mcu': got {'#receive_time': 834.769586348, u'next_clock': 3711600000L, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 834.878471608, u'next_clock': 3731400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 835.068611087, u'next_clock': 3765600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 835.178723483, u'next_clock': 3785400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 835.36881765, u'next_clock': 3819600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 835.478926816, u'next_clock': 3839400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 834.585464369} mcu 'mcu': got {'#receive_time': 835.669204837, u'next_clock': 3873600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 835.779334472, u'next_clock': 3893400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 835.969454733, u'next_clock': 3927600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 836.079592233, u'next_clock': 3947400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 836.268465514, u'next_clock': 3981600000L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 836.378621608, u'next_clock': 4001400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 835.569767702} mcu 'mcu': got {'#receive_time': 836.568834785, u'next_clock': 4035600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 836.678989472, u'next_clock': 4055400000L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 836.869111087, u'next_clock': 4089600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 836.979211139, u'next_clock': 4109400000L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 837.169339784, u'next_clock': 4143600000L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 837.279455357, u'next_clock': 4163400000L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 837.469593013, u'next_clock': 4197600000L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 836.554173795} mcu 'mcu': got {'#receive_time': 837.578575722, u'next_clock': 4217400000L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 837.768723378, u'next_clock': 4251600000L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 837.878882909, u'next_clock': 4271400000L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 838.068935982, u'next_clock': 10632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 838.179089732, u'next_clock': 30432704, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 838.36928218, u'next_clock': 64632704, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 838.479308013, u'next_clock': 84432704, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 837.538513222} mcu 'mcu': got {'#receive_time': 838.669580669, u'next_clock': 118632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 838.778454107, u'next_clock': 138432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 838.968584211, u'next_clock': 172632704, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 839.078858898, u'next_clock': 192432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 839.268851711, u'next_clock': 226632704, u'oid': 22, u'value': 31535, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 839.378984627, u'next_clock': 246432704, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 838.523573065} mcu 'mcu': got {'#receive_time': 839.569335929, u'next_clock': 280632704, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 839.679490669, u'next_clock': 300432704, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 839.869623325, u'next_clock': 334632704, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 839.978453742, u'next_clock': 354432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 840.168599054, u'next_clock': 388632704, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 840.278750669, u'next_clock': 408432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 840.468924002, u'next_clock': 442632704, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 839.508690929} mcu 'mcu': got {'#receive_time': 840.579083689, u'next_clock': 462432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 840.769212439, u'next_clock': 496632704, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 840.879317231, u'next_clock': 516432704, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 841.069465043, u'next_clock': 550632704, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 841.179595564, u'next_clock': 570432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 841.368463481, u'next_clock': 604632704, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 841.478533168, u'next_clock': 624432704, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 840.493547648} mcu 'mcu': got {'#receive_time': 841.668840876, u'next_clock': 658632704, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 841.778982335, u'next_clock': 678432704, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 841.969092543, u'next_clock': 712632704, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 842.079219939, u'next_clock': 732432704, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 842.269345407, u'next_clock': 766632704, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 842.379488272, u'next_clock': 786432704, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 841.478364783} mcu 'mcu': got {'#receive_time': 842.568475564, u'next_clock': 820632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 842.678750668, u'next_clock': 840432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 842.868710355, u'next_clock': 874632704, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 842.978992022, u'next_clock': 894432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 843.168950042, u'next_clock': 928632704, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 843.279089782, u'next_clock': 948432704, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 842.463241762} mcu 'mcu': got {'#receive_time': 843.469308376, u'next_clock': 982632704, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 843.579451917, u'next_clock': 1002432704, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 843.768322126, u'next_clock': 1036632704, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 843.878462646, u'next_clock': 1056432704, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 844.068547438, u'next_clock': 1090632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 844.178709417, u'next_clock': 1110432704, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 844.368824625, u'next_clock': 1144632704, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 843.448148792} mcu 'mcu': got {'#receive_time': 844.479156813, u'next_clock': 1164432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 844.669340927, u'next_clock': 1198632704, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 844.779490615, u'next_clock': 1218432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 844.96840025, u'next_clock': 1252632704, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 845.07866499, u'next_clock': 1272432704, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 845.268623948, u'next_clock': 1306632704, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 845.378723375, u'next_clock': 1326432704, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 844.433103115} mcu 'mcu': got {'#receive_time': 845.568977229, u'next_clock': 1360632704, u'oid': 22, u'value': 31533, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 845.679126812, u'next_clock': 1380432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 845.869299885, u'next_clock': 1414632704, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 845.979357541, u'next_clock': 1434432704, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 846.169479677, u'next_clock': 1468632704, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 846.278436916, u'next_clock': 1488432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 845.417260562} mcu 'mcu': got {'#receive_time': 846.468573687, u'next_clock': 1522632704, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 846.578698687, u'next_clock': 1542432704, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 846.768831968, u'next_clock': 1576632704, u'oid': 22, u'value': 31522, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 846.878959989, u'next_clock': 1596432704, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 847.069068947, u'next_clock': 1630632704, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 847.179212958, u'next_clock': 1650432704, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 847.369331864, u'next_clock': 1684632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 846.401730406} mcu 'mcu': got {'#receive_time': 847.478395041, u'next_clock': 1704432704, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 847.668478791, u'next_clock': 1738632704, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 847.778587801, u'next_clock': 1758432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 847.968784207, u'next_clock': 1792632704, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 848.079101811, u'next_clock': 1812432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 848.269040666, u'next_clock': 1846632704, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 847.386754989} mcu 'mcu': got {'#receive_time': 848.379158322, u'next_clock': 1866432704, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 848.569333738, u'next_clock': 1900632704, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 848.679461134, u'next_clock': 1920432704, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 848.868332697, u'next_clock': 1954632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 848.978431655, u'next_clock': 1974432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 849.168561759, u'next_clock': 2008632704, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 849.278725873, u'next_clock': 2028432704, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 848.371276186} mcu 'mcu': got {'#receive_time': 849.468947801, u'next_clock': 2062632704, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 849.579079728, u'next_clock': 2082432704, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 849.76932504, u'next_clock': 2116632704, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 849.87821603, u'next_clock': 2136432704, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 850.068342279, u'next_clock': 2170632704L, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 850.178463946, u'next_clock': 2190432704L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 849.356162957} mcu 'mcu': got {'#receive_time': 850.368661654, u'next_clock': 2224632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 850.478840092, u'next_clock': 2244432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 850.668991654, u'next_clock': 2278632704L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 850.779107904, u'next_clock': 2298432704L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 850.969263373, u'next_clock': 2332632704L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 851.079374987, u'next_clock': 2352432704L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 851.268245039, u'next_clock': 2386632704L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 850.341190404} mcu 'mcu': got {'#receive_time': 851.378440456, u'next_clock': 2406432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 851.568600664, u'next_clock': 2440632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 851.678947904, u'next_clock': 2460432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 851.868856602, u'next_clock': 2494632704L, u'oid': 22, u'value': 31523, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 851.978972018, u'next_clock': 2514432704L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 852.169107956, u'next_clock': 2548632704L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 852.279367799, u'next_clock': 2568432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 851.326340612} mcu 'mcu': got {'#receive_time': 852.46825056, u'next_clock': 2602632704L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 852.578365351, u'next_clock': 2622432704L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 852.768493268, u'next_clock': 2656632704L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 852.878630664, u'next_clock': 2676432704L, u'oid': 33, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 853.068750455, u'next_clock': 2710632704L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 853.178866966, u'next_clock': 2730432704L, u'oid': 33, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 852.311064414} mcu 'mcu': got {'#receive_time': 853.369081966, u'next_clock': 2764632704L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 853.479231028, u'next_clock': 2784432704L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 853.669356601, u'next_clock': 2818632704L, u'oid': 22, u'value': 31528, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 853.778233372, u'next_clock': 2838432704L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 853.968373528, u'next_clock': 2872632704L, u'oid': 22, u'value': 31525, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 854.078573215, u'next_clock': 2892432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 854.26865082, u'next_clock': 2926632704L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 853.296157174} mcu 'mcu': got {'#receive_time': 854.378809517, u'next_clock': 2946432704L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 854.568973684, u'next_clock': 2980632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 854.679202955, u'next_clock': 3000432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 854.869353476, u'next_clock': 3034632704L, u'oid': 22, u'value': 31526, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 854.978229569, u'next_clock': 3054432704L, u'oid': 33, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 855.168414725, u'next_clock': 3088632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 854.28117957} mcu 'mcu': got {'#receive_time': 855.278573423, u'next_clock': 3108432704L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 855.468704152, u'next_clock': 3142632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 855.578850142, u'next_clock': 3162432704L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 855.768964517, u'next_clock': 3196632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 855.879063788, u'next_clock': 3216432704L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 856.069215975, u'next_clock': 3250632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 856.179338892, u'next_clock': 3270432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 855.265308111} mcu 'mcu': got {'#receive_time': 856.368322485, u'next_clock': 3304632704L, u'oid': 22, u'value': 31527, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 856.478486235, u'next_clock': 3324432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 856.668605402, u'next_clock': 3358632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 856.778736339, u'next_clock': 3378432704L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 856.968851704, u'next_clock': 3412632704L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 857.079150298, u'next_clock': 3432432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 856.249790298} mcu 'mcu': got {'#receive_time': 857.269183058, u'next_clock': 3466632704L, u'oid': 22, u'value': 31536, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 857.379325506, u'next_clock': 3486432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 857.568260297, u'next_clock': 3520632704L, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 857.678360714, u'next_clock': 3540432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 857.868471287, u'next_clock': 3574632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 857.978615558, u'next_clock': 3594432704L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 858.16874686, u'next_clock': 3628632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 857.233812381} mcu 'mcu': got {'#receive_time': 858.279085193, u'next_clock': 3648432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 858.469065401, u'next_clock': 3682632704L, u'oid': 22, u'value': 31535, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 858.579206755, u'next_clock': 3702432704L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 858.768079307, u'next_clock': 3736632704L, u'oid': 22, u'value': 31529, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 858.878189516, u'next_clock': 3756432704L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 859.068339932, u'next_clock': 3790632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 859.178454984, u'next_clock': 3810432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 858.217922745} mcu 'mcu': got {'#receive_time': 859.368725922, u'next_clock': 3844632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 859.478813005, u'next_clock': 3864432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 859.669058422, u'next_clock': 3898632704L, u'oid': 22, u'value': 31536, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 859.77920363, u'next_clock': 3918432704L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 859.968075713, u'next_clock': 3952632704L, u'oid': 22, u'value': 31535, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 860.078228161, u'next_clock': 3972432704L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 859.202957588} mcu 'mcu': got {'#receive_time': 860.268497692, u'next_clock': 4006632704L, u'oid': 22, u'value': 31534, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 860.378577276, u'next_clock': 4026432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 860.568717328, u'next_clock': 4060632704L, u'oid': 22, u'value': 31532, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 860.678832848, u'next_clock': 4080432704L, u'oid': 33, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 860.868947119, u'next_clock': 4114632704L, u'oid': 22, u'value': 31536, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 860.979077015, u'next_clock': 4134432704L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 861.169204463, u'next_clock': 4168632704L, u'oid': 22, u'value': 31531, '#name': u'analog_in_state', '#sent_time': 860.187970505} mcu 'mcu': got {'#receive_time': 861.278196077, u'next_clock': 4188432704L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 861.468315088, u'next_clock': 4222632704L, u'oid': 22, u'value': 31530, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 861.578458369, u'next_clock': 4242432704L, u'oid': 33, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 861.768575608, u'next_clock': 4276632704L, u'oid': 22, u'value': 31535, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 861.87869415, u'next_clock': 1465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 862.068833056, u'next_clock': 35665408, u'oid': 22, u'value': 31535, '#name': u'analog_in_state', '#sent_time': 861.172560817} mcu 'mcu': got {'#receive_time': 862.179056181, u'next_clock': 55465408, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 862.369170869, u'next_clock': 89665408, u'oid': 22, u'value': 31539, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 862.478118681, u'next_clock': 109465408, u'oid': 33, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 862.668204514, u'next_clock': 143665408, u'oid': 22, u'value': 31538, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 862.77835415, u'next_clock': 163465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 862.968489983, u'next_clock': 197665408, u'oid': 22, u'value': 31538, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 863.07865441, u'next_clock': 217465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 862.15733816} mcu 'mcu': got {'#receive_time': 863.268904045, u'next_clock': 251665408, u'oid': 22, u'value': 31539, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 863.378975868, u'next_clock': 271465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 863.569105816, u'next_clock': 305665408, u'oid': 22, u'value': 31538, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 863.679272691, u'next_clock': 325465408, u'oid': 33, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 863.868104462, u'next_clock': 359665408, u'oid': 22, u'value': 31536, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 863.978243264, u'next_clock': 379465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 863.142450452} mcu 'mcu': got {'#receive_time': 864.168456024, u'next_clock': 413665408, u'oid': 22, u'value': 31538, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 864.278830191, u'next_clock': 433465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 864.468696649, u'next_clock': 467665408, u'oid': 22, u'value': 31540, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 864.578834149, u'next_clock': 487465408, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 864.769058159, u'next_clock': 521665408, u'oid': 22, u'value': 31541, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 864.879209409, u'next_clock': 541465408, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 865.06808769, u'next_clock': 575665408, u'oid': 22, u'value': 31541, '#name': u'analog_in_state', '#sent_time': 864.127610034} mcu 'mcu': got {'#receive_time': 865.178345763, u'next_clock': 595465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 865.368478992, u'next_clock': 629665408, u'oid': 22, u'value': 31544, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 865.478597951, u'next_clock': 649465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 865.66874519, u'next_clock': 683665408, u'oid': 22, u'value': 31544, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 865.778861232, u'next_clock': 703465408, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 865.96898295, u'next_clock': 737665408, u'oid': 22, u'value': 31544, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 866.079379773, u'next_clock': 757465408, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 865.112762534} mcu 'mcu': got {'#receive_time': 866.268146023, u'next_clock': 791665408, u'oid': 22, u'value': 31545, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 866.378201284, u'next_clock': 811465408, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 866.568348523, u'next_clock': 845665408, u'oid': 22, u'value': 31545, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 866.678548836, u'next_clock': 865465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 866.868608627, u'next_clock': 899665408, u'oid': 22, u'value': 31545, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 866.978732273, u'next_clock': 919465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 866.097001909} mcu 'mcu': got {'#receive_time': 867.168966283, u'next_clock': 953665408, u'oid': 22, u'value': 31550, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 867.279110294, u'next_clock': 973465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 867.467939669, u'next_clock': 1007665408, u'oid': 22, u'value': 31546, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 867.578086439, u'next_clock': 1027465408, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 867.768200398, u'next_clock': 1061665408, u'oid': 22, u'value': 31549, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 867.878333783, u'next_clock': 1081465408, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 867.081503679} mcu 'mcu': got {'#receive_time': 868.068549616, u'next_clock': 1115665408, u'oid': 22, u'value': 31547, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.178718106, u'next_clock': 1135465408, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.368844408, u'next_clock': 1169665408, u'oid': 22, u'value': 31550, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.478965554, u'next_clock': 1189465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.669094147, u'next_clock': 1223665408, u'oid': 22, u'value': 31551, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.777991335, u'next_clock': 1243465408, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 868.968105606, u'next_clock': 1277665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 868.065779981} mcu 'mcu': got {'#receive_time': 869.07839071, u'next_clock': 1297465408, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.268492897, u'next_clock': 1331665408, u'oid': 22, u'value': 31551, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.378614251, u'next_clock': 1351465408, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.56872847, u'next_clock': 1385665408, u'oid': 22, u'value': 31555, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.678839303, u'next_clock': 1405465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.869103886, u'next_clock': 1439665408, u'oid': 22, u'value': 31555, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 869.977980397, u'next_clock': 1459465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 869.05003347} mcu 'mcu': got {'#receive_time': 870.168209407, u'next_clock': 1493665408, u'oid': 22, u'value': 31555, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 870.278691386, u'next_clock': 1513465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 870.468415397, u'next_clock': 1547665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 870.57853248, u'next_clock': 1567465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 870.768659355, u'next_clock': 1601665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 870.878784459, u'next_clock': 1621465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 870.034986126} mcu 'mcu': got {'#receive_time': 871.069093053, u'next_clock': 1655665408, u'oid': 22, u'value': 31550, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.177998261, u'next_clock': 1675465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.368090969, u'next_clock': 1709665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.478234875, u'next_clock': 1729465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.6683455, u'next_clock': 1763665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.778483313, u'next_clock': 1783465408, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 871.96864649, u'next_clock': 1817665408, u'oid': 22, u'value': 31557, '#name': u'analog_in_state', '#sent_time': 871.019531594} mcu 'mcu': got {'#receive_time': 872.078837323, u'next_clock': 1837465408, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.269053469, u'next_clock': 1871665408, u'oid': 22, u'value': 31554, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.379094719, u'next_clock': 1891465408, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.568041906, u'next_clock': 1925665408, u'oid': 22, u'value': 31560, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.678150865, u'next_clock': 1945465408, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.868238573, u'next_clock': 1979665408, u'oid': 22, u'value': 31560, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 872.978367219, u'next_clock': 1999465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 872.004551959} mcu 'mcu': got {'#receive_time': 873.168622219, u'next_clock': 2033665408, u'oid': 22, u'value': 31557, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 873.278819458, u'next_clock': 2053465408, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 873.468834823, u'next_clock': 2087665408, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 873.578995864, u'next_clock': 2107465408, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 873.767851645, u'next_clock': 2141665408, u'oid': 22, u'value': 31557, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 873.877984875, u'next_clock': 2161465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 872.98944951} mcu 'mcu': got {'#receive_time': 874.068197583, u'next_clock': 2195665408L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.178363156, u'next_clock': 2215465408L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.368592687, u'next_clock': 2249665408L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.478602218, u'next_clock': 2269465408L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.668718364, u'next_clock': 2303665408L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.779071072, u'next_clock': 2323465408L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 873.973879979} mcu 'mcu': got {'#receive_time': 874.967943364, u'next_clock': 2357665408L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.078283468, u'next_clock': 2377465408L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.268211332, u'next_clock': 2411665408L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.378348155, u'next_clock': 2431465408L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.568442478, u'next_clock': 2465665408L, u'oid': 22, u'value': 31563, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.678596124, u'next_clock': 2485465408L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.868743311, u'next_clock': 2519665408L, u'oid': 22, u'value': 31558, '#name': u'analog_in_state', '#sent_time': 874.958069249} mcu 'mcu': got {'#receive_time': 875.978961176, u'next_clock': 2539465408L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.167850967, u'next_clock': 2573665408L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.278026957, u'next_clock': 2593465408L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.468058363, u'next_clock': 2627665408L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.578135498, u'next_clock': 2647465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.768264196, u'next_clock': 2681665408L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 876.878416696, u'next_clock': 2701465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 875.942289457} mcu 'mcu': got {'#receive_time': 877.068723311, u'next_clock': 2735665408L, u'oid': 22, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.178850446, u'next_clock': 2755465408L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.368945707, u'next_clock': 2789665408L, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.477840238, u'next_clock': 2809465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.667976175, u'next_clock': 2843665408L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.77809404, u'next_clock': 2863465408L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 876.9266343} mcu 'mcu': got {'#receive_time': 877.96833779, u'next_clock': 2897665408L, u'oid': 22, u'value': 31567, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.078496279, u'next_clock': 2917465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.268638779, u'next_clock': 2951665408L, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.378730862, u'next_clock': 2971465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.568863831, u'next_clock': 3005665408L, u'oid': 22, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.679003831, u'next_clock': 3025465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.86810581, u'next_clock': 3059665408L, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 877.911951748} mcu 'mcu': got {'#receive_time': 878.978089768, u'next_clock': 3079465408L, u'oid': 33, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.168258623, u'next_clock': 3113665408L, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.278360654, u'next_clock': 3133465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.468460393, u'next_clock': 3167665408L, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.578595914, u'next_clock': 3187465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.768749976, u'next_clock': 3221665408L, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 879.879000601, u'next_clock': 3241465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 878.896579039} mcu 'mcu': got {'#receive_time': 880.067977528, u'next_clock': 3275665408L, u'oid': 22, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.17810956, u'next_clock': 3295465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.368199351, u'next_clock': 3329665408L, u'oid': 22, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.478355757, u'next_clock': 3349465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.668523309, u'next_clock': 3383665408L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.778608778, u'next_clock': 3403465408L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 879.881631643} mcu 'mcu': got {'#receive_time': 880.96885883, u'next_clock': 3437665408L, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.077749403, u'next_clock': 3457465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.26787357, u'next_clock': 3491665408L, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.377985913, u'next_clock': 3511465408L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.568103882, u'next_clock': 3545665408L, u'oid': 22, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.678312267, u'next_clock': 3565465408L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 880.86602758} mcu 'mcu': got {'#receive_time': 881.868441799, u'next_clock': 3599665408L, u'oid': 22, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 881.978587371, u'next_clock': 3619465408L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.168724403, u'next_clock': 3653665408L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.27885284, u'next_clock': 3673465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.4676931, u'next_clock': 3707665408L, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.57783935, u'next_clock': 3727465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.767962475, u'next_clock': 3761665408L, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 881.851095236} mcu 'mcu': got {'#receive_time': 882.878225079, u'next_clock': 3781465408L, u'oid': 33, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.068360548, u'next_clock': 3815665408L, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.178475288, u'next_clock': 3835465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.368600183, u'next_clock': 3869665408L, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.478698308, u'next_clock': 3889465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.668852787, u'next_clock': 3923665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.777736798, u'next_clock': 3943465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 882.835774142} mcu 'mcu': got {'#receive_time': 883.968005339, u'next_clock': 3977665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.078088048, u'next_clock': 3997465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.268237631, u'next_clock': 4031665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.378307162, u'next_clock': 4051465408L, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.568471068, u'next_clock': 4085665408L, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.678614037, u'next_clock': 4105465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 883.819995964} mcu 'mcu': got {'#receive_time': 884.867710027, u'next_clock': 4139665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 884.977850079, u'next_clock': 4159465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.167981224, u'next_clock': 4193665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.278102735, u'next_clock': 4213465408L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.468202578, u'next_clock': 4247665408L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.578358776, u'next_clock': 4267465408L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.768485391, u'next_clock': 6698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 884.80415086} mcu 'mcu': got {'#receive_time': 885.878715807, u'next_clock': 26498112, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.068869818, u'next_clock': 60698112, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.177732734, u'next_clock': 80498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.367834141, u'next_clock': 114698112, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.477964141, u'next_clock': 134498112, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.668100963, u'next_clock': 168698112, u'oid': 22, u'value': 31581, '#name': u'analog_in_state', '#sent_time': 885.789073255} mcu 'mcu': got {'#receive_time': 886.778289297, u'next_clock': 188498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 886.968477317, u'next_clock': 222698112, u'oid': 22, u'value': 31588, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.078606432, u'next_clock': 242498112, u'oid': 33, u'value': 31567, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.268724192, u'next_clock': 276698112, u'oid': 22, u'value': 31584, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.378800234, u'next_clock': 296498112, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.567715286, u'next_clock': 330698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.677856067, u'next_clock': 350498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 886.773940807} mcu 'mcu': got {'#receive_time': 887.868078463, u'next_clock': 384698112, u'oid': 22, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 887.978213932, u'next_clock': 404498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 888.168341119, u'next_clock': 438698112, u'oid': 22, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 888.278593046, u'next_clock': 458498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 888.468595911, u'next_clock': 492698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 888.578741223, u'next_clock': 512498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 887.758386275} mcu 'mcu': got {'#receive_time': 888.7677119, u'next_clock': 546698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 888.877865025, u'next_clock': 566498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.067987473, u'next_clock': 600698112, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.178104765, u'next_clock': 620498112, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.368185337, u'next_clock': 654698112, u'oid': 22, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.478313566, u'next_clock': 674498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.668457369, u'next_clock': 708698112, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 888.743304504} mcu 'mcu': got {'#receive_time': 889.778692056, u'next_clock': 728498112, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 889.967692941, u'next_clock': 762698112, u'oid': 22, u'value': 31584, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.077812316, u'next_clock': 782498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.267986639, u'next_clock': 816698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.378054295, u'next_clock': 836498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.568199347, u'next_clock': 870698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.67833216, u'next_clock': 890498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 889.728636066} mcu 'mcu': got {'#receive_time': 890.868586066, u'next_clock': 924698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 890.97871341, u'next_clock': 944498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 891.167595441, u'next_clock': 978698112, u'oid': 22, u'value': 31581, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 891.277717316, u'next_clock': 998498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 891.467824972, u'next_clock': 1032698112, u'oid': 22, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 891.577954659, u'next_clock': 1052498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 890.713373254} mcu 'mcu': got {'#receive_time': 891.768208201, u'next_clock': 1086698112, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 891.878336534, u'next_clock': 1106498112, u'oid': 33, u'value': 31567, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.068451066, u'next_clock': 1140698112, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.17857794, u'next_clock': 1160498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.368664711, u'next_clock': 1194698112, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.477583461, u'next_clock': 1214498112, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.667704086, u'next_clock': 1248698112, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 891.69849643} mcu 'mcu': got {'#receive_time': 892.777952159, u'next_clock': 1268498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 892.968095648, u'next_clock': 1302698112, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 893.078201326, u'next_clock': 1322498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 893.268334398, u'next_clock': 1356698112, u'oid': 22, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 893.378450336, u'next_clock': 1376498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 893.568579919, u'next_clock': 1410698112, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 892.683096482} mcu 'mcu': got {'#receive_time': 893.677583304, u'next_clock': 1430498112, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 893.867715336, u'next_clock': 1464698112, u'oid': 22, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 893.977861013, u'next_clock': 1484498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 894.167961481, u'next_clock': 1518698112, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 894.278132263, u'next_clock': 1538498112, u'oid': 33, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 894.468200856, u'next_clock': 1572698112, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 894.578327627, u'next_clock': 1592498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 893.668241638} mcu 'mcu': got {'#receive_time': 894.768572627, u'next_clock': 1626698112, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 894.878706117, u'next_clock': 1646498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 895.067708408, u'next_clock': 1680698112, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 895.177856116, u'next_clock': 1700498112, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 895.367967366, u'next_clock': 1734698112, u'oid': 22, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 895.478067418, u'next_clock': 1754498112, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 894.653164919} mcu 'mcu': got {'#receive_time': 895.668304241, u'next_clock': 1788698112, u'oid': 22, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 895.778558616, u'next_clock': 1808498112, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 895.968594918, u'next_clock': 1842698112, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 896.077459241, u'next_clock': 1862498112, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 896.267569241, u'next_clock': 1896698112, u'oid': 22, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 896.377714553, u'next_clock': 1916498112, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 896.56786023, u'next_clock': 1950698112, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 895.638062575} mcu 'mcu': got {'#receive_time': 896.678117782, u'next_clock': 1970498112, u'oid': 33, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 896.622375699} mcu 'mcu': got {'#receive_time': 896.868228512, u'next_clock': 2004698112, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 896.622375699} mcu 'mcu': got {'#receive_time': 896.978381168, u'next_clock': 2024498112, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 896.622375699} webhooks client 1971108120: Disconnected Restarting printer Start printer at Thu Feb 9 14:35:52 2023 (1675971352.2 898.2) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968593056: New connection webhooks client 1968593056: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} mcu 'mcu': got {'#receive_time': 899.977506896, u'next_clock': 2564498112L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 899.939284865} mcu 'mcu': got {'#receive_time': 900.168149656, u'next_clock': 2598698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 900.144878771} mcu 'mcu': got {'#receive_time': 900.278602, u'next_clock': 2618498112L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 900.247878458} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'mcu': got {'#receive_time': 900.467862989, u'next_clock': 2652698112L, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 900.360189083} mcu 'mcu': got {'#receive_time': 900.577894864, u'next_clock': 2672498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 900.360189083} mcu 'mcu': got {'#receive_time': 900.768005593, u'next_clock': 2706698112L, u'oid': 22, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 900.360189083} mcu 'mcu': got {'#receive_time': 900.878132989, u'next_clock': 2726498112L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 900.360189083} Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 180, in _connect cb() File "/home/pi/klipper/klippy/mcu.py", line 726, in _connect config_params = self._send_get_config() File "/home/pi/klipper/klippy/mcu.py", line 713, in _send_get_config self._name,)) error: Can not update MCU 'mcu' config as it is shutdown Build file /home/pi/klipper/klippy/../.config(680): Thu Feb 9 14:30:48 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_CANBUS_FREQUENCY=500000 CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(9213): Thu Feb 9 14:32:17 2023 Last MCU build version: v0.11.0-101-g17f7c039 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(582512): Thu Feb 9 14:32:29 2023 mcu 'mcu': got {'#receive_time': 901.068429812, u'next_clock': 2760698112L, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 900.96175377} mcu 'mcu': got {'#receive_time': 901.178530958, u'next_clock': 2780498112L, u'oid': 33, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 900.96175377} mcu 'mcu': got {'#receive_time': 901.367606739, u'next_clock': 2814698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 901.477704343, u'next_clock': 2834498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 901.667847885, u'next_clock': 2868698112L, u'oid': 22, u'value': 31563, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 901.777981322, u'next_clock': 2888498112L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 901.968049239, u'next_clock': 2922698112L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 902.078224135, u'next_clock': 2942498112L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 902.26835778, u'next_clock': 2976698112L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 901.345011531} mcu 'mcu': got {'#receive_time': 902.378603145, u'next_clock': 2996498112L, u'oid': 33, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 902.567470072, u'next_clock': 3030698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 902.677595384, u'next_clock': 3050498112L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 902.867721374, u'next_clock': 3084698112L, u'oid': 22, u'value': 31563, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 902.977833041, u'next_clock': 3104498112L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 903.168108822, u'next_clock': 3138698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 903.278079811, u'next_clock': 3158498112L, u'oid': 33, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 902.329849864} mcu 'mcu': got {'#receive_time': 903.468327311, u'next_clock': 3192698112L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 903.578474707, u'next_clock': 3212498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 903.767378092, u'next_clock': 3246698112L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 903.877491113, u'next_clock': 3266498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 904.067625071, u'next_clock': 3300698112L, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 904.177743613, u'next_clock': 3320498112L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 903.315006582} mcu 'mcu': got {'#receive_time': 904.367988717, u'next_clock': 3354698112L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 904.478111061, u'next_clock': 3374498112L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 904.668233769, u'next_clock': 3408698112L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 904.77836179, u'next_clock': 3428498112L, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 904.967282884, u'next_clock': 3462698112L, u'oid': 22, u'value': 31560, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 905.077505331, u'next_clock': 3482498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 905.267571321, u'next_clock': 3516698112L, u'oid': 22, u'value': 31561, '#name': u'analog_in_state', '#sent_time': 904.3000733} mcu 'mcu': got {'#receive_time': 905.377853613, u'next_clock': 3536498112L, u'oid': 33, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 905.567958769, u'next_clock': 3570698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 905.678094029, u'next_clock': 3590498112L, u'oid': 33, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 905.868204602, u'next_clock': 3624698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 905.978322831, u'next_clock': 3644498112L, u'oid': 33, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 906.168460591, u'next_clock': 3678698112L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 905.285266894} mcu 'mcu': got {'#receive_time': 906.27742856, u'next_clock': 3698498112L, u'oid': 33, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 906.467556268, u'next_clock': 3732698112L, u'oid': 22, u'value': 31560, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 906.577715904, u'next_clock': 3752498112L, u'oid': 33, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 906.767837466, u'next_clock': 3786698112L, u'oid': 22, u'value': 31559, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 906.877943716, u'next_clock': 3806498112L, u'oid': 33, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 907.068090904, u'next_clock': 3840698112L, u'oid': 22, u'value': 31556, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 907.178210278, u'next_clock': 3860498112L, u'oid': 33, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 906.270379341} mcu 'mcu': got {'#receive_time': 907.36848731, u'next_clock': 3894698112L, u'oid': 22, u'value': 31562, '#name': u'analog_in_state', '#sent_time': 907.254900851} Attempting MCU 'mcu' reset command Attempting MCU 'rpi' config_reset command Got EOF when reading from device webhooks client 1968593056: Disconnected Restarting printer Start printer at Thu Feb 9 14:36:02 2023 (1675971362.5 908.5) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1971128600: New connection webhooks client 1971128600: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=161638689 clock_est=(910.884 144370005 49996556.257) min_half_rtt=0.000078 min_rtt_time=911.229 time_avg=910.884(0.018) clock_avg=144370005.396(875406.113) pred_variance=1842906395.678 clock_adj=(-0.777 49998050.750) Dumping serial stats: bytes_write=826 bytes_read=4423 bytes_retransmit=0 bytes_invalid=0 send_seq=112 receive_seq=112 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 96 messages Sent 0 910.636066 910.636066 8: seq: 10, identify offset=0 count=40 Sent 1 910.637322 910.637322 8: seq: 11, identify offset=40 count=40 Sent 2 910.638312 910.638312 8: seq: 12, identify offset=80 count=40 Sent 3 910.639217 910.639217 9: seq: 13, identify offset=120 count=40 Sent 4 910.640137 910.640137 9: seq: 14, identify offset=160 count=40 Sent 5 910.641042 910.641042 9: seq: 15, identify offset=200 count=40 Sent 6 910.641939 910.641939 9: seq: 16, identify offset=240 count=40 Sent 7 910.642829 910.642829 9: seq: 17, identify offset=280 count=40 Sent 8 910.643737 910.643737 9: seq: 18, identify offset=320 count=40 Sent 9 910.644642 910.644642 9: seq: 19, identify offset=360 count=40 Sent 10 910.645535 910.645535 9: seq: 1a, identify offset=400 count=40 Sent 11 910.646433 910.646433 9: seq: 1b, identify offset=440 count=40 Sent 12 910.647612 910.647612 9: seq: 1c, identify offset=480 count=40 Sent 13 910.648589 910.648589 9: seq: 1d, identify offset=520 count=40 Sent 14 910.649785 910.649785 9: seq: 1e, identify offset=560 count=40 Sent 15 910.650698 910.650698 9: seq: 1f, identify offset=600 count=40 Sent 16 910.651590 910.651590 9: seq: 10, identify offset=640 count=40 Sent 17 910.652518 910.652518 9: seq: 11, identify offset=680 count=40 Sent 18 910.653402 910.653402 9: seq: 12, identify offset=720 count=40 Sent 19 910.654278 910.654278 9: seq: 13, identify offset=760 count=40 Sent 20 910.655169 910.655169 9: seq: 14, identify offset=800 count=40 Sent 21 910.656056 910.656056 9: seq: 15, identify offset=840 count=40 Sent 22 910.657287 910.657287 9: seq: 16, identify offset=880 count=40 Sent 23 910.658278 910.658278 9: seq: 17, identify offset=920 count=40 Sent 24 910.659222 910.659222 9: seq: 18, identify offset=960 count=40 Sent 25 910.660138 910.660138 9: seq: 19, identify offset=1000 count=40 Sent 26 910.661038 910.661038 9: seq: 1a, identify offset=1040 count=40 Sent 27 910.661929 910.661929 9: seq: 1b, identify offset=1080 count=40 Sent 28 910.662827 910.662827 9: seq: 1c, identify offset=1120 count=40 Sent 29 910.663727 910.663727 9: seq: 1d, identify offset=1160 count=40 Sent 30 910.664611 910.664611 9: seq: 1e, identify offset=1200 count=40 Sent 31 910.665498 910.665498 9: seq: 1f, identify offset=1240 count=40 Sent 32 910.666414 910.666414 9: seq: 10, identify offset=1280 count=40 Sent 33 910.667776 910.667776 9: seq: 11, identify offset=1320 count=40 Sent 34 910.668792 910.668792 9: seq: 12, identify offset=1360 count=40 Sent 35 910.669721 910.669721 9: seq: 13, identify offset=1400 count=40 Sent 36 910.670658 910.670658 9: seq: 14, identify offset=1440 count=40 Sent 37 910.671592 910.671592 9: seq: 15, identify offset=1480 count=40 Sent 38 910.672549 910.672549 9: seq: 16, identify offset=1520 count=40 Sent 39 910.673468 910.673468 9: seq: 17, identify offset=1560 count=40 Sent 40 910.674389 910.674389 9: seq: 18, identify offset=1600 count=40 Sent 41 910.675315 910.675315 9: seq: 19, identify offset=1640 count=40 Sent 42 910.676260 910.676260 9: seq: 1a, identify offset=1680 count=40 Sent 43 910.677550 910.677550 9: seq: 1b, identify offset=1720 count=40 Sent 44 910.678525 910.678525 9: seq: 1c, identify offset=1760 count=40 Sent 45 910.679459 910.679459 9: seq: 1d, identify offset=1800 count=40 Sent 46 910.680373 910.680373 9: seq: 1e, identify offset=1840 count=40 Sent 47 910.681326 910.681326 9: seq: 1f, identify offset=1880 count=40 Sent 48 910.682241 910.682241 9: seq: 10, identify offset=1920 count=40 Sent 49 910.683152 910.683152 9: seq: 11, identify offset=1960 count=40 Sent 50 910.684362 910.684362 9: seq: 12, identify offset=2000 count=40 Sent 51 910.685349 910.685349 9: seq: 13, identify offset=2040 count=40 Sent 52 910.686357 910.686357 9: seq: 14, identify offset=2080 count=40 Sent 53 910.688008 910.688008 9: seq: 15, identify offset=2120 count=40 Sent 54 910.690512 910.690512 9: seq: 16, identify offset=2160 count=40 Sent 55 910.691856 910.691856 9: seq: 17, identify offset=2200 count=40 Sent 56 910.692950 910.692950 9: seq: 18, identify offset=2240 count=40 Sent 57 910.693923 910.693923 9: seq: 19, identify offset=2280 count=40 Sent 58 910.694929 910.694929 9: seq: 1a, identify offset=2320 count=40 Sent 59 910.695887 910.695887 9: seq: 1b, identify offset=2360 count=40 Sent 60 910.697032 910.697032 9: seq: 1c, identify offset=2400 count=40 Sent 61 910.698180 910.698180 9: seq: 1d, identify offset=2440 count=40 Sent 62 910.699142 910.699142 9: seq: 1e, identify offset=2480 count=40 Sent 63 910.700099 910.700099 9: seq: 1f, identify offset=2520 count=40 Sent 64 910.701114 910.701114 9: seq: 10, identify offset=2560 count=40 Sent 65 910.702116 910.702116 9: seq: 11, identify offset=2600 count=40 Sent 66 910.703068 910.703068 9: seq: 12, identify offset=2640 count=40 Sent 67 910.704003 910.704003 9: seq: 13, identify offset=2680 count=40 Sent 68 910.704958 910.704958 9: seq: 14, identify offset=2720 count=40 Sent 69 910.705901 910.705901 9: seq: 15, identify offset=2760 count=40 Sent 70 910.706968 910.706968 9: seq: 16, identify offset=2800 count=40 Sent 71 910.708121 910.708121 9: seq: 17, identify offset=2840 count=40 Sent 72 910.709085 910.709085 9: seq: 18, identify offset=2880 count=40 Sent 73 910.710050 910.710050 9: seq: 19, identify offset=2920 count=40 Sent 74 910.711006 910.711006 9: seq: 1a, identify offset=2960 count=40 Sent 75 910.712082 910.712082 9: seq: 1b, identify offset=3000 count=40 Sent 76 910.713030 910.713030 9: seq: 1c, identify offset=3040 count=40 Sent 77 910.713710 910.713710 9: seq: 1d, identify offset=3080 count=40 Sent 78 910.714283 910.714283 9: seq: 1e, identify offset=3095 count=40 Sent 79 910.814650 910.814650 6: seq: 1f, get_uptime Sent 80 910.867986 910.867986 6: seq: 10, get_clock Sent 81 910.919141 910.919141 6: seq: 11, get_clock Sent 82 910.971017 910.971017 6: seq: 12, get_clock Sent 83 911.022130 911.022130 6: seq: 13, get_clock Sent 84 911.073135 911.073135 6: seq: 14, get_clock Sent 85 911.124241 911.124241 6: seq: 15, get_clock Sent 86 911.175231 911.175231 6: seq: 16, get_clock Sent 87 911.226709 911.226709 6: seq: 17, get_clock Sent 88 911.229435 911.229435 6: seq: 18, get_clock Sent 89 911.252115 911.252115 6: seq: 19, get_config Sent 90 911.253847 911.253847 7: seq: 1a, allocate_oids count=2 Sent 91 911.254071 911.254071 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 911.254193 911.254193 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 911.254345 911.254345 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 911.256624 911.256624 11: seq: 1e, finalize_config crc=4031677248 Sent 95 911.256942 911.256942 6: seq: 1f, get_config Dumping receive queue 92 messages Receive: 0 910.634079 0.000000 6: seq: 10, starting Receive: 1 910.636315 910.636066 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 910.637545 910.637322 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 910.638506 910.638312 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 910.639427 910.639217 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 910.640341 910.640137 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 910.641237 910.641042 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 910.642127 910.641939 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 910.643034 910.642829 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 910.643942 910.643737 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 910.644835 910.644642 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 910.645740 910.645535 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 910.646648 910.646433 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 910.647855 910.647612 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 910.648873 910.648589 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 910.649987 910.649785 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 910.650885 910.650698 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 910.651818 910.651590 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 910.652707 910.652518 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 910.653588 910.653402 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 910.654478 910.654278 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 910.655362 910.655169 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 910.656242 910.656056 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 910.657511 910.657287 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 910.658488 910.658278 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 910.659429 910.659222 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 910.660338 910.660138 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 910.661227 910.661038 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 910.662119 910.661929 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 910.663031 910.662827 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 910.663914 910.663727 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 910.664799 910.664611 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 910.665698 910.665498 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 910.666640 910.666414 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 910.668037 910.667776 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 910.668993 910.668792 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 910.669939 910.669721 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 910.670888 910.670658 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 910.671825 910.671592 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 910.672750 910.672549 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 910.673669 910.673468 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 910.674591 910.674389 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 910.675536 910.675315 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 910.676462 910.676260 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 910.677771 910.677550 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 910.678731 910.678525 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 910.679660 910.679459 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 910.680608 910.680373 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 910.681525 910.681326 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 910.682441 910.682241 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 910.683429 910.683152 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 910.684593 910.684362 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 910.685602 910.685349 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 910.686583 910.686357 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 910.688326 910.688008 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 910.690810 910.690512 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 910.692094 910.691856 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 910.693169 910.692950 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 910.694139 910.693923 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 910.695126 910.694929 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 910.696087 910.695887 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 910.697340 910.697032 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 910.698386 910.698180 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 910.699353 910.699142 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 910.700309 910.700099 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 910.701328 910.701114 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 910.702314 910.702116 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 910.703267 910.703068 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 910.704204 910.704003 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 910.705156 910.704958 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 910.706097 910.705901 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 910.707311 910.706968 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 910.708326 910.708121 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 910.709314 910.709085 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=859476645 clock_est=(31.843 842178648 49993699.446) min_half_rtt=0.000077 min_rtt_time=32.189 time_avg=31.843(0.018) clock_avg=842178648.893(877128.413) pred_variance=1843188933.680 clock_adj=(19.112 49993604.250) Dumping serial stats: bytes_write=826 bytes_read=4469 bytes_retransmit=0 bytes_invalid=0 send_seq=112 receive_seq=112 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 96 messages Sent 0 31.579625 31.579625 8: seq: 10, identify offset=0 count=40 Sent 1 31.584684 31.584684 8: seq: 11, identify offset=40 count=40 Sent 2 31.585659 31.585659 8: seq: 12, identify offset=80 count=40 Sent 3 31.586287 31.586287 9: seq: 13, identify offset=120 count=40 Sent 4 31.586883 31.586883 9: seq: 14, identify offset=160 count=40 Sent 5 31.587490 31.587490 9: seq: 15, identify offset=200 count=40 Sent 6 31.588099 31.588099 9: seq: 16, identify offset=240 count=40 Sent 7 31.590076 31.590076 9: seq: 17, identify offset=280 count=40 Sent 8 31.592776 31.592776 9: seq: 18, identify offset=320 count=40 Sent 9 31.593757 31.593757 9: seq: 19, identify offset=360 count=40 Sent 10 31.594690 31.594690 9: seq: 1a, identify offset=400 count=40 Sent 11 31.595722 31.595722 9: seq: 1b, identify offset=440 count=40 Sent 12 31.596487 31.596487 9: seq: 1c, identify offset=480 count=40 Sent 13 31.597328 31.597328 9: seq: 1d, identify offset=520 count=40 Sent 14 31.598248 31.598248 9: seq: 1e, identify offset=560 count=40 Sent 15 31.599214 31.599214 9: seq: 1f, identify offset=600 count=40 Sent 16 31.600148 31.600148 9: seq: 10, identify offset=640 count=40 Sent 17 31.601279 31.601279 9: seq: 11, identify offset=680 count=40 Sent 18 31.602139 31.602139 9: seq: 12, identify offset=720 count=40 Sent 19 31.602817 31.602817 9: seq: 13, identify offset=760 count=40 Sent 20 31.603564 31.603564 9: seq: 14, identify offset=800 count=40 Sent 21 31.604439 31.604439 9: seq: 15, identify offset=840 count=40 Sent 22 31.605321 31.605321 9: seq: 16, identify offset=880 count=40 Sent 23 31.606048 31.606048 9: seq: 17, identify offset=920 count=40 Sent 24 31.606945 31.606945 9: seq: 18, identify offset=960 count=40 Sent 25 31.607879 31.607879 9: seq: 19, identify offset=1000 count=40 Sent 26 31.608788 31.608788 9: seq: 1a, identify offset=1040 count=40 Sent 27 31.609611 31.609611 9: seq: 1b, identify offset=1080 count=40 Sent 28 31.610992 31.610992 9: seq: 1c, identify offset=1120 count=40 Sent 29 31.611902 31.611902 9: seq: 1d, identify offset=1160 count=40 Sent 30 31.612901 31.612901 9: seq: 1e, identify offset=1200 count=40 Sent 31 31.613761 31.613761 9: seq: 1f, identify offset=1240 count=40 Sent 32 31.614446 31.614446 9: seq: 10, identify offset=1280 count=40 Sent 33 31.615240 31.615240 9: seq: 11, identify offset=1320 count=40 Sent 34 31.616085 31.616085 9: seq: 12, identify offset=1360 count=40 Sent 35 31.616893 31.616893 9: seq: 13, identify offset=1400 count=40 Sent 36 31.617565 31.617565 9: seq: 14, identify offset=1440 count=40 Sent 37 31.618322 31.618322 9: seq: 15, identify offset=1480 count=40 Sent 38 31.619250 31.619250 9: seq: 16, identify offset=1520 count=40 Sent 39 31.620214 31.620214 9: seq: 17, identify offset=1560 count=40 Sent 40 31.621340 31.621340 9: seq: 18, identify offset=1600 count=40 Sent 41 31.622002 31.622002 9: seq: 19, identify offset=1640 count=40 Sent 42 31.622856 31.622856 9: seq: 1a, identify offset=1680 count=40 Sent 43 31.623646 31.623646 9: seq: 1b, identify offset=1720 count=40 Sent 44 31.624408 31.624408 9: seq: 1c, identify offset=1760 count=40 Sent 45 31.625254 31.625254 9: seq: 1d, identify offset=1800 count=40 Sent 46 31.626062 31.626062 9: seq: 1e, identify offset=1840 count=40 Sent 47 31.626892 31.626892 9: seq: 1f, identify offset=1880 count=40 Sent 48 31.627692 31.627692 9: seq: 10, identify offset=1920 count=40 Sent 49 31.628488 31.628488 9: seq: 11, identify offset=1960 count=40 Sent 50 31.629436 31.629436 9: seq: 12, identify offset=2000 count=40 Sent 51 31.630486 31.630486 9: seq: 13, identify offset=2040 count=40 Sent 52 31.632002 31.632002 9: seq: 14, identify offset=2080 count=40 Sent 53 31.633008 31.633008 9: seq: 15, identify offset=2120 count=40 Sent 54 31.633872 31.633872 9: seq: 16, identify offset=2160 count=40 Sent 55 31.634711 31.634711 9: seq: 17, identify offset=2200 count=40 Sent 56 31.635614 31.635614 9: seq: 18, identify offset=2240 count=40 Sent 57 31.636466 31.636466 9: seq: 19, identify offset=2280 count=40 Sent 58 31.637384 31.637384 9: seq: 1a, identify offset=2320 count=40 Sent 59 31.638366 31.638366 9: seq: 1b, identify offset=2360 count=40 Sent 60 31.639361 31.639361 9: seq: 1c, identify offset=2400 count=40 Sent 61 31.640218 31.640218 9: seq: 1d, identify offset=2440 count=40 Sent 62 31.641197 31.641197 9: seq: 1e, identify offset=2480 count=40 Sent 63 31.642464 31.642464 9: seq: 1f, identify offset=2520 count=40 Sent 64 31.643238 31.643238 9: seq: 10, identify offset=2560 count=40 Sent 65 31.643971 31.643971 9: seq: 11, identify offset=2600 count=40 Sent 66 31.644850 31.644850 9: seq: 12, identify offset=2640 count=40 Sent 67 31.645781 31.645781 9: seq: 13, identify offset=2680 count=40 Sent 68 31.646847 31.646847 9: seq: 14, identify offset=2720 count=40 Sent 69 31.647749 31.647749 9: seq: 15, identify offset=2760 count=40 Sent 70 31.648465 31.648465 9: seq: 16, identify offset=2800 count=40 Sent 71 31.649427 31.649427 9: seq: 17, identify offset=2840 count=40 Sent 72 31.650559 31.650559 9: seq: 18, identify offset=2880 count=40 Sent 73 31.651480 31.651480 9: seq: 19, identify offset=2920 count=40 Sent 74 31.652972 31.652972 9: seq: 1a, identify offset=2960 count=40 Sent 75 31.654679 31.654679 9: seq: 1b, identify offset=3000 count=40 Sent 76 31.655451 31.655451 9: seq: 1c, identify offset=3040 count=40 Sent 77 31.656250 31.656250 9: seq: 1d, identify offset=3080 count=40 Sent 78 31.657199 31.657199 9: seq: 1e, identify offset=3095 count=40 Sent 79 31.773972 31.773972 6: seq: 1f, get_uptime Sent 80 31.827257 31.827257 6: seq: 10, get_clock Sent 81 31.878867 31.878867 6: seq: 11, get_clock Sent 82 31.930205 31.930205 6: seq: 12, get_clock Sent 83 31.981429 31.981429 6: seq: 13, get_clock Sent 84 32.032605 32.032605 6: seq: 14, get_clock Sent 85 32.083818 32.083818 6: seq: 15, get_clock Sent 86 32.135102 32.135102 6: seq: 16, get_clock Sent 87 32.186244 32.186244 6: seq: 17, get_clock Sent 88 32.189429 32.189429 6: seq: 18, get_clock Sent 89 32.214778 32.214778 6: seq: 19, get_config Sent 90 32.217916 32.217916 7: seq: 1a, allocate_oids count=2 Sent 91 32.217982 32.217982 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 32.218078 32.218078 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 32.218178 32.218178 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 32.218286 32.218286 11: seq: 1e, finalize_config crc=4031677248 Sent 95 32.220326 32.220326 6: seq: 1f, get_config Dumping receive queue 95 messages Receive: 0 31.577937 0.000000 6: seq: 10, starting Receive: 1 31.577940 0.000000 11: seq: 10, stats count=51 sum=9908 sumsq=9986 Receive: 2 31.577941 0.000000 12: seq: 10, stats count=50 sum=11453 sumsq=25858 Receive: 3 31.577942 0.000000 12: seq: 10, stats count=50 sum=11636 sumsq=22287 Receive: 4 31.579865 31.579625 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 5 31.584920 31.584684 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 6 31.585801 31.585659 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 7 31.586422 31.586287 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 8 31.587017 31.586883 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 9 31.587638 31.587490 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 10 31.588229 31.588099 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 11 31.590279 31.590076 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 12 31.592988 31.592776 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 13 31.593966 31.593757 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 14 31.594938 31.594690 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 15 31.595910 31.595722 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 16 31.596643 31.596487 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 17 31.597542 31.597328 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 18 31.598419 31.598248 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 19 31.599393 31.599214 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 20 31.600365 31.600148 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 21 31.601471 31.601279 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 22 31.602302 31.602139 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 23 31.602958 31.602817 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 24 31.603770 31.603564 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 25 31.604613 31.604439 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 26 31.605484 31.605321 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 27 31.606205 31.606048 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 28 31.607137 31.606945 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 29 31.608066 31.607879 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 30 31.608986 31.608788 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 31 31.609787 31.609611 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 32 31.611192 31.610992 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 33 31.612124 31.611902 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 34 31.613094 31.612901 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 35 31.613926 31.613761 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 36 31.614592 31.614446 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 37 31.615424 31.615240 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 38 31.616264 31.616085 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 39 31.617045 31.616893 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 40 31.617696 31.617565 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 41 31.618518 31.618322 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 42 31.619444 31.619250 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 43 31.620399 31.620214 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 44 31.621501 31.621340 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 45 31.622164 31.622002 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 46 31.623038 31.622856 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 47 31.623815 31.623646 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 48 31.624593 31.624408 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 49 31.625432 31.625254 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 50 31.626265 31.626062 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 51 31.627066 31.626892 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 52 31.627866 31.627692 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 53 31.628697 31.628488 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 54 31.629628 31.629436 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 55 31.630702 31.630486 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 56 31.632209 31.632002 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 57 31.633199 31.633008 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 58 31.634053 31.633872 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 59 31.634909 31.634711 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 60 31.635789 31.635614 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 61 31.636653 31.636466 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 62 31.637584 31.637384 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 63 31.638563 31.638366 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 64 31.639534 31.639361 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 65 31.640407 31.640218 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 66 31.641438 31.641197 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 67 31.642656 31.642464 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 68 31.643413 31.643238 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 69 31.644136 31.643971 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 70 31.645053 31.644850 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 71 31.645982 31.645781 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 72 31.647042 31.646847 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 73 31.647915 31.647749 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 74 31.648669 31.648465 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 75 31.649613 31.649427 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 76 31.650843 31.650559 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968064432: New connection webhooks client 1968064432: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=181355731 clock_est=(518.283 164170649 49993396.973) min_half_rtt=0.000071 min_rtt_time=518.522 time_avg=518.283(0.017) clock_avg=164170649.927(866289.087) pred_variance=1851250343.503 clock_adj=(-1.179 49984996.500) Dumping serial stats: bytes_write=816 bytes_read=4413 bytes_retransmit=0 bytes_invalid=0 send_seq=110 receive_seq=110 retransmit_seq=0 srtt=0.000 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 94 messages Sent 0 518.011194 518.011194 8: seq: 10, identify offset=0 count=40 Sent 1 518.012529 518.012529 8: seq: 11, identify offset=40 count=40 Sent 2 518.013287 518.013287 8: seq: 12, identify offset=80 count=40 Sent 3 518.013850 518.013850 9: seq: 13, identify offset=120 count=40 Sent 4 518.014388 518.014388 9: seq: 14, identify offset=160 count=40 Sent 5 518.015603 518.015603 9: seq: 15, identify offset=200 count=40 Sent 6 518.017323 518.017323 9: seq: 16, identify offset=240 count=40 Sent 7 518.018225 518.018225 9: seq: 17, identify offset=280 count=40 Sent 8 518.019114 518.019114 9: seq: 18, identify offset=320 count=40 Sent 9 518.020057 518.020057 9: seq: 19, identify offset=360 count=40 Sent 10 518.020956 518.020956 9: seq: 1a, identify offset=400 count=40 Sent 11 518.021801 518.021801 9: seq: 1b, identify offset=440 count=40 Sent 12 518.022582 518.022582 9: seq: 1c, identify offset=480 count=40 Sent 13 518.023389 518.023389 9: seq: 1d, identify offset=520 count=40 Sent 14 518.024223 518.024223 9: seq: 1e, identify offset=560 count=40 Sent 15 518.025041 518.025041 9: seq: 1f, identify offset=600 count=40 Sent 16 518.025758 518.025758 9: seq: 10, identify offset=640 count=40 Sent 17 518.026422 518.026422 9: seq: 11, identify offset=680 count=40 Sent 18 518.028149 518.028149 9: seq: 12, identify offset=720 count=40 Sent 19 518.028977 518.028977 9: seq: 13, identify offset=760 count=40 Sent 20 518.029703 518.029703 9: seq: 14, identify offset=800 count=40 Sent 21 518.030801 518.030801 9: seq: 15, identify offset=840 count=40 Sent 22 518.031432 518.031432 9: seq: 16, identify offset=880 count=40 Sent 23 518.032413 518.032413 9: seq: 17, identify offset=920 count=40 Sent 24 518.033243 518.033243 9: seq: 18, identify offset=960 count=40 Sent 25 518.038643 518.038643 9: seq: 19, identify offset=1000 count=40 Sent 26 518.045114 518.045114 9: seq: 1a, identify offset=1040 count=40 Sent 27 518.049414 518.049414 9: seq: 1b, identify offset=1080 count=40 Sent 28 518.052246 518.052246 9: seq: 1c, identify offset=1120 count=40 Sent 29 518.053529 518.053529 9: seq: 1d, identify offset=1160 count=40 Sent 30 518.054682 518.054682 9: seq: 1e, identify offset=1200 count=40 Sent 31 518.056443 518.056443 9: seq: 1f, identify offset=1240 count=40 Sent 32 518.057584 518.057584 9: seq: 10, identify offset=1280 count=40 Sent 33 518.058527 518.058527 9: seq: 11, identify offset=1320 count=40 Sent 34 518.059460 518.059460 9: seq: 12, identify offset=1360 count=40 Sent 35 518.060718 518.060718 9: seq: 13, identify offset=1400 count=40 Sent 36 518.061708 518.061708 9: seq: 14, identify offset=1440 count=40 Sent 37 518.062634 518.062634 9: seq: 15, identify offset=1480 count=40 Sent 38 518.063545 518.063545 9: seq: 16, identify offset=1520 count=40 Sent 39 518.064439 518.064439 9: seq: 17, identify offset=1560 count=40 Sent 40 518.065548 518.065548 9: seq: 18, identify offset=1600 count=40 Sent 41 518.067589 518.067589 9: seq: 19, identify offset=1640 count=40 Sent 42 518.069135 518.069135 9: seq: 1a, identify offset=1680 count=40 Sent 43 518.070641 518.070641 9: seq: 1b, identify offset=1720 count=40 Sent 44 518.071726 518.071726 9: seq: 1c, identify offset=1760 count=40 Sent 45 518.072646 518.072646 9: seq: 1d, identify offset=1800 count=40 Sent 46 518.073535 518.073535 9: seq: 1e, identify offset=1840 count=40 Sent 47 518.074432 518.074432 9: seq: 1f, identify offset=1880 count=40 Sent 48 518.075316 518.075316 9: seq: 10, identify offset=1920 count=40 Sent 49 518.076207 518.076207 9: seq: 11, identify offset=1960 count=40 Sent 50 518.077071 518.077071 9: seq: 12, identify offset=2000 count=40 Sent 51 518.077948 518.077948 9: seq: 13, identify offset=2040 count=40 Sent 52 518.078833 518.078833 9: seq: 14, identify offset=2080 count=40 Sent 53 518.079696 518.079696 9: seq: 15, identify offset=2120 count=40 Sent 54 518.081114 518.081114 9: seq: 16, identify offset=2160 count=40 Sent 55 518.082018 518.082018 9: seq: 17, identify offset=2200 count=40 Sent 56 518.082888 518.082888 9: seq: 18, identify offset=2240 count=40 Sent 57 518.083768 518.083768 9: seq: 19, identify offset=2280 count=40 Sent 58 518.084688 518.084688 9: seq: 1a, identify offset=2320 count=40 Sent 59 518.085573 518.085573 9: seq: 1b, identify offset=2360 count=40 Sent 60 518.086430 518.086430 9: seq: 1c, identify offset=2400 count=40 Sent 61 518.087297 518.087297 9: seq: 1d, identify offset=2440 count=40 Sent 62 518.088151 518.088151 9: seq: 1e, identify offset=2480 count=40 Sent 63 518.089011 518.089011 9: seq: 1f, identify offset=2520 count=40 Sent 64 518.090290 518.090290 9: seq: 10, identify offset=2560 count=40 Sent 65 518.091288 518.091288 9: seq: 11, identify offset=2600 count=40 Sent 66 518.092176 518.092176 9: seq: 12, identify offset=2640 count=40 Sent 67 518.093036 518.093036 9: seq: 13, identify offset=2680 count=40 Sent 68 518.093915 518.093915 9: seq: 14, identify offset=2720 count=40 Sent 69 518.094783 518.094783 9: seq: 15, identify offset=2760 count=40 Sent 70 518.095639 518.095639 9: seq: 16, identify offset=2800 count=40 Sent 71 518.096500 518.096500 9: seq: 17, identify offset=2840 count=40 Sent 72 518.097385 518.097385 9: seq: 18, identify offset=2880 count=40 Sent 73 518.098243 518.098243 9: seq: 19, identify offset=2920 count=40 Sent 74 518.099104 518.099104 9: seq: 1a, identify offset=2960 count=40 Sent 75 518.100310 518.100310 9: seq: 1b, identify offset=3000 count=40 Sent 76 518.101284 518.101284 9: seq: 1c, identify offset=3040 count=40 Sent 77 518.102204 518.102204 9: seq: 1d, identify offset=3080 count=40 Sent 78 518.103077 518.103077 9: seq: 1e, identify offset=3095 count=40 Sent 79 518.214006 518.214006 6: seq: 1f, get_uptime Sent 80 518.266964 518.266964 6: seq: 10, get_clock Sent 81 518.317902 518.317902 6: seq: 11, get_clock Sent 82 518.369095 518.369095 6: seq: 12, get_clock Sent 83 518.420159 518.420159 6: seq: 13, get_clock Sent 84 518.471082 518.471082 6: seq: 14, get_clock Sent 85 518.521987 518.521987 6: seq: 15, get_clock Sent 86 518.572874 518.572874 6: seq: 16, get_clock Sent 87 518.624112 518.624112 6: seq: 17, get_clock Sent 88 518.626550 518.626550 6: seq: 18, get_clock Sent 89 518.647223 518.647223 6: seq: 19, get_config Sent 90 518.649211 518.649211 9: seq: 1a, allocate_oids count=2, config_spi_without_cs oid=0 Sent 91 518.649392 518.649392 8: seq: 1b, config_adxl345 oid=1 spi_oid=0 Sent 92 518.649413 518.649413 13: seq: 1c, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 93 518.649618 518.649618 12: seq: 1d, finalize_config crc=4031677248, get_config Dumping receive queue 92 messages Receive: 0 518.009258 0.000000 6: seq: 10, starting Receive: 1 518.011418 518.011194 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 518.012707 518.012529 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 518.013411 518.013287 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 518.013965 518.013850 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 518.014617 518.014388 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 518.015772 518.015603 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 518.017526 518.017323 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 518.018412 518.018225 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 518.019329 518.019114 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 518.020230 518.020057 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 518.021177 518.020956 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 518.021979 518.021801 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 518.022740 518.022582 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 518.023559 518.023389 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 518.024419 518.024223 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 518.025193 518.025041 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 518.025914 518.025758 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 518.026567 518.026422 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 518.028331 518.028149 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 518.029152 518.028977 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 518.030195 518.029703 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 518.030948 518.030801 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 518.031580 518.031432 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 518.032584 518.032413 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 518.033421 518.033243 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 518.038898 518.038643 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 518.045473 518.045114 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 518.049733 518.049414 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 518.052533 518.052246 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 518.053772 518.053529 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 518.054950 518.054682 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 518.056718 518.056443 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 518.057792 518.057584 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 518.058714 518.058527 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 518.059744 518.059460 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 518.060934 518.060718 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 518.061914 518.061708 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 518.062832 518.062634 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 518.063734 518.063545 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 518.064636 518.064439 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 518.065864 518.065548 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 518.067861 518.067589 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 518.069402 518.069135 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 518.070888 518.070641 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 518.071937 518.071726 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 518.072844 518.072646 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 518.073742 518.073535 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 518.074619 518.074432 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 518.075521 518.075316 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 518.076393 518.076207 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 518.077260 518.077071 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 518.078156 518.077948 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 518.079017 518.078833 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 518.080347 518.079696 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 518.081316 518.081114 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 518.082207 518.082018 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 518.083083 518.082888 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 518.083970 518.083768 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 518.084877 518.084688 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 518.085757 518.085573 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 518.086625 518.086430 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 518.087479 518.087297 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 518.088340 518.088151 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 518.089205 518.089011 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 518.090526 518.090290 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 518.091484 518.091288 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 518.092363 518.092176 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 518.093239 518.093036 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 518.094111 518.093915 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 518.094972 518.094783 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 518.095826 518.095639 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 518.096715 518.096500 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 518.097571 518.097385 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968003472: New connection webhooks client 1968003472: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=144934425 clock_est=(4978.557 127740102 49990769.503) min_half_rtt=0.000068 min_rtt_time=4978.745 time_avg=4978.557(0.017) clock_avg=127740102.422(867553.621) pred_variance=1846912287.765 clock_adj=(-0.440 49990271.750) Dumping serial stats: bytes_write=826 bytes_read=4423 bytes_retransmit=0 bytes_invalid=0 send_seq=112 receive_seq=112 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 96 messages Sent 0 4978.300572 4978.300572 8: seq: 10, identify offset=0 count=40 Sent 1 4978.301505 4978.301505 8: seq: 11, identify offset=40 count=40 Sent 2 4978.302058 4978.302058 8: seq: 12, identify offset=80 count=40 Sent 3 4978.302614 4978.302614 9: seq: 13, identify offset=120 count=40 Sent 4 4978.303344 4978.303344 9: seq: 14, identify offset=160 count=40 Sent 5 4978.304038 4978.304038 9: seq: 15, identify offset=200 count=40 Sent 6 4978.304567 4978.304567 9: seq: 16, identify offset=240 count=40 Sent 7 4978.305077 4978.305077 9: seq: 17, identify offset=280 count=40 Sent 8 4978.305575 4978.305575 9: seq: 18, identify offset=320 count=40 Sent 9 4978.306083 4978.306083 9: seq: 19, identify offset=360 count=40 Sent 10 4978.306587 4978.306587 9: seq: 1a, identify offset=400 count=40 Sent 11 4978.307084 4978.307084 9: seq: 1b, identify offset=440 count=40 Sent 12 4978.307595 4978.307595 9: seq: 1c, identify offset=480 count=40 Sent 13 4978.308279 4978.308279 9: seq: 1d, identify offset=520 count=40 Sent 14 4978.313408 4978.313408 9: seq: 1e, identify offset=560 count=40 Sent 15 4978.314275 4978.314275 9: seq: 1f, identify offset=600 count=40 Sent 16 4978.315076 4978.315076 9: seq: 10, identify offset=640 count=40 Sent 17 4978.315840 4978.315840 9: seq: 11, identify offset=680 count=40 Sent 18 4978.316646 4978.316646 9: seq: 12, identify offset=720 count=40 Sent 19 4978.317693 4978.317693 9: seq: 13, identify offset=760 count=40 Sent 20 4978.318518 4978.318518 9: seq: 14, identify offset=800 count=40 Sent 21 4978.319179 4978.319179 9: seq: 15, identify offset=840 count=40 Sent 22 4978.319757 4978.319757 9: seq: 16, identify offset=880 count=40 Sent 23 4978.320317 4978.320317 9: seq: 17, identify offset=920 count=40 Sent 24 4978.320933 4978.320933 9: seq: 18, identify offset=960 count=40 Sent 25 4978.321473 4978.321473 9: seq: 19, identify offset=1000 count=40 Sent 26 4978.322014 4978.322014 9: seq: 1a, identify offset=1040 count=40 Sent 27 4978.322549 4978.322549 9: seq: 1b, identify offset=1080 count=40 Sent 28 4978.323167 4978.323167 9: seq: 1c, identify offset=1120 count=40 Sent 29 4978.323719 4978.323719 9: seq: 1d, identify offset=1160 count=40 Sent 30 4978.324234 4978.324234 9: seq: 1e, identify offset=1200 count=40 Sent 31 4978.324770 4978.324770 9: seq: 1f, identify offset=1240 count=40 Sent 32 4978.325288 4978.325288 9: seq: 10, identify offset=1280 count=40 Sent 33 4978.325806 4978.325806 9: seq: 11, identify offset=1320 count=40 Sent 34 4978.326446 4978.326446 9: seq: 12, identify offset=1360 count=40 Sent 35 4978.327004 4978.327004 9: seq: 13, identify offset=1400 count=40 Sent 36 4978.327983 4978.327983 9: seq: 14, identify offset=1440 count=40 Sent 37 4978.328891 4978.328891 9: seq: 15, identify offset=1480 count=40 Sent 38 4978.329754 4978.329754 9: seq: 16, identify offset=1520 count=40 Sent 39 4978.330627 4978.330627 9: seq: 17, identify offset=1560 count=40 Sent 40 4978.331505 4978.331505 9: seq: 18, identify offset=1600 count=40 Sent 41 4978.332382 4978.332382 9: seq: 19, identify offset=1640 count=40 Sent 42 4978.333352 4978.333352 9: seq: 1a, identify offset=1680 count=40 Sent 43 4978.334372 4978.334372 9: seq: 1b, identify offset=1720 count=40 Sent 44 4978.335264 4978.335264 9: seq: 1c, identify offset=1760 count=40 Sent 45 4978.336160 4978.336160 9: seq: 1d, identify offset=1800 count=40 Sent 46 4978.337028 4978.337028 9: seq: 1e, identify offset=1840 count=40 Sent 47 4978.337902 4978.337902 9: seq: 1f, identify offset=1880 count=40 Sent 48 4978.338813 4978.338813 9: seq: 10, identify offset=1920 count=40 Sent 49 4978.339677 4978.339677 9: seq: 11, identify offset=1960 count=40 Sent 50 4978.340542 4978.340542 9: seq: 12, identify offset=2000 count=40 Sent 51 4978.341436 4978.341436 9: seq: 13, identify offset=2040 count=40 Sent 52 4978.342311 4978.342311 9: seq: 14, identify offset=2080 count=40 Sent 53 4978.343256 4978.343256 9: seq: 15, identify offset=2120 count=40 Sent 54 4978.344154 4978.344154 9: seq: 16, identify offset=2160 count=40 Sent 55 4978.345065 4978.345065 9: seq: 17, identify offset=2200 count=40 Sent 56 4978.345932 4978.345932 9: seq: 18, identify offset=2240 count=40 Sent 57 4978.346798 4978.346798 9: seq: 19, identify offset=2280 count=40 Sent 58 4978.347687 4978.347687 9: seq: 1a, identify offset=2320 count=40 Sent 59 4978.348561 4978.348561 9: seq: 1b, identify offset=2360 count=40 Sent 60 4978.349422 4978.349422 9: seq: 1c, identify offset=2400 count=40 Sent 61 4978.350294 4978.350294 9: seq: 1d, identify offset=2440 count=40 Sent 62 4978.351330 4978.351330 9: seq: 1e, identify offset=2480 count=40 Sent 63 4978.352220 4978.352220 9: seq: 1f, identify offset=2520 count=40 Sent 64 4978.353192 4978.353192 9: seq: 10, identify offset=2560 count=40 Sent 65 4978.354124 4978.354124 9: seq: 11, identify offset=2600 count=40 Sent 66 4978.355009 4978.355009 9: seq: 12, identify offset=2640 count=40 Sent 67 4978.355906 4978.355906 9: seq: 13, identify offset=2680 count=40 Sent 68 4978.361170 4978.361170 9: seq: 14, identify offset=2720 count=40 Sent 69 4978.362127 4978.362127 9: seq: 15, identify offset=2760 count=40 Sent 70 4978.363112 4978.363112 9: seq: 16, identify offset=2800 count=40 Sent 71 4978.364055 4978.364055 9: seq: 17, identify offset=2840 count=40 Sent 72 4978.364964 4978.364964 9: seq: 18, identify offset=2880 count=40 Sent 73 4978.365830 4978.365830 9: seq: 19, identify offset=2920 count=40 Sent 74 4978.366693 4978.366693 9: seq: 1a, identify offset=2960 count=40 Sent 75 4978.367596 4978.367596 9: seq: 1b, identify offset=3000 count=40 Sent 76 4978.368578 4978.368578 9: seq: 1c, identify offset=3040 count=40 Sent 77 4978.369465 4978.369465 9: seq: 1d, identify offset=3080 count=40 Sent 78 4978.370375 4978.370375 9: seq: 1e, identify offset=3095 count=40 Sent 79 4978.488168 4978.488168 6: seq: 1f, get_uptime Sent 80 4978.541019 4978.541019 6: seq: 10, get_clock Sent 81 4978.591908 4978.591908 6: seq: 11, get_clock Sent 82 4978.643538 4978.643538 6: seq: 12, get_clock Sent 83 4978.694481 4978.694481 6: seq: 13, get_clock Sent 84 4978.745356 4978.745356 6: seq: 14, get_clock Sent 85 4978.796240 4978.796240 6: seq: 15, get_clock Sent 86 4978.847112 4978.847112 6: seq: 16, get_clock Sent 87 4978.898755 4978.898755 6: seq: 17, get_clock Sent 88 4978.901121 4978.901121 6: seq: 18, get_clock Sent 89 4978.919563 4978.919563 6: seq: 19, get_config Sent 90 4978.921251 4978.921251 7: seq: 1a, allocate_oids count=2 Sent 91 4978.921473 4978.921473 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 4978.921565 4978.921565 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 4978.921658 4978.921658 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 94 4978.921836 4978.921836 11: seq: 1e, finalize_config crc=4031677248 Sent 95 4978.922002 4978.922002 6: seq: 1f, get_config Dumping receive queue 92 messages Receive: 0 4978.299623 0.000000 6: seq: 10, starting Receive: 1 4978.300810 4978.300572 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 4978.301631 4978.301505 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 4978.302165 4978.302058 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 4978.302762 4978.302614 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 4978.303522 4978.303344 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 4978.304145 4978.304038 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 4978.304672 4978.304567 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 4978.305180 4978.305077 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 4978.305679 4978.305575 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 4978.306189 4978.306083 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 4978.306686 4978.306587 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 4978.307188 4978.307084 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 4978.307722 4978.307595 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 4978.308437 4978.308279 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 4978.313587 4978.313408 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 4978.314435 4978.314275 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 4978.315229 4978.315076 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 4978.315988 4978.315840 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 4978.316802 4978.316646 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 4978.317855 4978.317693 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 4978.318657 4978.318518 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 4978.319292 4978.319179 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 4978.319867 4978.319757 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 4978.320459 4978.320317 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 4978.321046 4978.320933 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 4978.321579 4978.321473 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 4978.322131 4978.322014 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 4978.322716 4978.322549 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 4978.323281 4978.323167 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 4978.323825 4978.323719 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 4978.324340 4978.324234 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 4978.324878 4978.324770 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 4978.325394 4978.325288 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 4978.325922 4978.325806 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 4978.326558 4978.326446 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 4978.327215 4978.327004 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 4978.328179 4978.327983 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 4978.329068 4978.328891 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 4978.329943 4978.329754 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 4978.330818 4978.330627 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 4978.331682 4978.331505 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 4978.332560 4978.332382 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 4978.333634 4978.333352 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 4978.334570 4978.334372 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 4978.335439 4978.335264 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 4978.336339 4978.336160 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 4978.337209 4978.337028 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 4978.338081 4978.337902 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 4978.338990 4978.338813 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 4978.339854 4978.339677 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 4978.340722 4978.340542 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 4978.341612 4978.341436 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 4978.342486 4978.342311 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 4978.343454 4978.343256 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 4978.344333 4978.344154 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 4978.345242 4978.345065 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 4978.346109 4978.345932 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 4978.346978 4978.346798 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 4978.347864 4978.347687 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 4978.348735 4978.348561 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 4978.349602 4978.349422 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 4978.350469 4978.350294 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 4978.351524 4978.351330 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 4978.352398 4978.352220 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 4978.353404 4978.353192 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 4978.354301 4978.354124 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 4978.355186 4978.355009 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 4978.356114 4978.355906 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 4978.361388 4978.361170 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 4978.362306 4978.362127 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 4978.363330 4978.363112 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 4978.364233 4978.364055 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 4978.365143 4978.364964 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1969019760: New connection webhooks client 1969019760: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=656065236 clock_est=(5410.781 638888609 49994293.288) min_half_rtt=0.000066 min_rtt_time=5410.815 time_avg=5410.781(0.017) clock_avg=638888609.637(862238.245) pred_variance=1843293133.455 clock_adj=(-0.618 49992461.250) Dumping serial stats: bytes_write=821 bytes_read=4452 bytes_retransmit=0 bytes_invalid=0 send_seq=111 receive_seq=111 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 95 messages Sent 0 5410.510100 5410.510100 8: seq: 10, identify offset=0 count=40 Sent 1 5410.511885 5410.511885 8: seq: 11, identify offset=40 count=40 Sent 2 5410.513091 5410.513091 8: seq: 12, identify offset=80 count=40 Sent 3 5410.514222 5410.514222 9: seq: 13, identify offset=120 count=40 Sent 4 5410.515298 5410.515298 9: seq: 14, identify offset=160 count=40 Sent 5 5410.516342 5410.516342 9: seq: 15, identify offset=200 count=40 Sent 6 5410.517401 5410.517401 9: seq: 16, identify offset=240 count=40 Sent 7 5410.518455 5410.518455 9: seq: 17, identify offset=280 count=40 Sent 8 5410.519511 5410.519511 9: seq: 18, identify offset=320 count=40 Sent 9 5410.520558 5410.520558 9: seq: 19, identify offset=360 count=40 Sent 10 5410.521609 5410.521609 9: seq: 1a, identify offset=400 count=40 Sent 11 5410.522710 5410.522710 9: seq: 1b, identify offset=440 count=40 Sent 12 5410.524087 5410.524087 9: seq: 1c, identify offset=480 count=40 Sent 13 5410.525206 5410.525206 9: seq: 1d, identify offset=520 count=40 Sent 14 5410.526254 5410.526254 9: seq: 1e, identify offset=560 count=40 Sent 15 5410.527167 5410.527167 9: seq: 1f, identify offset=600 count=40 Sent 16 5410.528073 5410.528073 9: seq: 10, identify offset=640 count=40 Sent 17 5410.529206 5410.529206 9: seq: 11, identify offset=680 count=40 Sent 18 5410.530125 5410.530125 9: seq: 12, identify offset=720 count=40 Sent 19 5410.531040 5410.531040 9: seq: 13, identify offset=760 count=40 Sent 20 5410.531938 5410.531938 9: seq: 14, identify offset=800 count=40 Sent 21 5410.532825 5410.532825 9: seq: 15, identify offset=840 count=40 Sent 22 5410.533869 5410.533869 9: seq: 16, identify offset=880 count=40 Sent 23 5410.534815 5410.534815 9: seq: 17, identify offset=920 count=40 Sent 24 5410.535729 5410.535729 9: seq: 18, identify offset=960 count=40 Sent 25 5410.536625 5410.536625 9: seq: 19, identify offset=1000 count=40 Sent 26 5410.537536 5410.537536 9: seq: 1a, identify offset=1040 count=40 Sent 27 5410.538434 5410.538434 9: seq: 1b, identify offset=1080 count=40 Sent 28 5410.539333 5410.539333 9: seq: 1c, identify offset=1120 count=40 Sent 29 5410.540254 5410.540254 9: seq: 1d, identify offset=1160 count=40 Sent 30 5410.541165 5410.541165 9: seq: 1e, identify offset=1200 count=40 Sent 31 5410.542054 5410.542054 9: seq: 1f, identify offset=1240 count=40 Sent 32 5410.543008 5410.543008 9: seq: 10, identify offset=1280 count=40 Sent 33 5410.543961 5410.543961 9: seq: 11, identify offset=1320 count=40 Sent 34 5410.544908 5410.544908 9: seq: 12, identify offset=1360 count=40 Sent 35 5410.546119 5410.546119 9: seq: 13, identify offset=1400 count=40 Sent 36 5410.547073 5410.547073 9: seq: 14, identify offset=1440 count=40 Sent 37 5410.547975 5410.547975 9: seq: 15, identify offset=1480 count=40 Sent 38 5410.548870 5410.548870 9: seq: 16, identify offset=1520 count=40 Sent 39 5410.549770 5410.549770 9: seq: 17, identify offset=1560 count=40 Sent 40 5410.550661 5410.550661 9: seq: 18, identify offset=1600 count=40 Sent 41 5410.551542 5410.551542 9: seq: 19, identify offset=1640 count=40 Sent 42 5410.552433 5410.552433 9: seq: 1a, identify offset=1680 count=40 Sent 43 5410.553571 5410.553571 9: seq: 1b, identify offset=1720 count=40 Sent 44 5410.554605 5410.554605 9: seq: 1c, identify offset=1760 count=40 Sent 45 5410.555626 5410.555626 9: seq: 1d, identify offset=1800 count=40 Sent 46 5410.558163 5410.558163 9: seq: 1e, identify offset=1840 count=40 Sent 47 5410.559181 5410.559181 9: seq: 1f, identify offset=1880 count=40 Sent 48 5410.560097 5410.560097 9: seq: 10, identify offset=1920 count=40 Sent 49 5410.561016 5410.561016 9: seq: 11, identify offset=1960 count=40 Sent 50 5410.561923 5410.561923 9: seq: 12, identify offset=2000 count=40 Sent 51 5410.562819 5410.562819 9: seq: 13, identify offset=2040 count=40 Sent 52 5410.563900 5410.563900 9: seq: 14, identify offset=2080 count=40 Sent 53 5410.564824 5410.564824 9: seq: 15, identify offset=2120 count=40 Sent 54 5410.565724 5410.565724 9: seq: 16, identify offset=2160 count=40 Sent 55 5410.567726 5410.567726 9: seq: 17, identify offset=2200 count=40 Sent 56 5410.570806 5410.570806 9: seq: 18, identify offset=2240 count=40 Sent 57 5410.572056 5410.572056 9: seq: 19, identify offset=2280 count=40 Sent 58 5410.573076 5410.573076 9: seq: 1a, identify offset=2320 count=40 Sent 59 5410.573997 5410.573997 9: seq: 1b, identify offset=2360 count=40 Sent 60 5410.574918 5410.574918 9: seq: 1c, identify offset=2400 count=40 Sent 61 5410.575815 5410.575815 9: seq: 1d, identify offset=2440 count=40 Sent 62 5410.576711 5410.576711 9: seq: 1e, identify offset=2480 count=40 Sent 63 5410.577601 5410.577601 9: seq: 1f, identify offset=2520 count=40 Sent 64 5410.578523 5410.578523 9: seq: 10, identify offset=2560 count=40 Sent 65 5410.579420 5410.579420 9: seq: 11, identify offset=2600 count=40 Sent 66 5410.580627 5410.580627 9: seq: 12, identify offset=2640 count=40 Sent 67 5410.581592 5410.581592 9: seq: 13, identify offset=2680 count=40 Sent 68 5410.582545 5410.582545 9: seq: 14, identify offset=2720 count=40 Sent 69 5410.583529 5410.583529 9: seq: 15, identify offset=2760 count=40 Sent 70 5410.584456 5410.584456 9: seq: 16, identify offset=2800 count=40 Sent 71 5410.585358 5410.585358 9: seq: 17, identify offset=2840 count=40 Sent 72 5410.586278 5410.586278 9: seq: 18, identify offset=2880 count=40 Sent 73 5410.587178 5410.587178 9: seq: 19, identify offset=2920 count=40 Sent 74 5410.588079 5410.588079 9: seq: 1a, identify offset=2960 count=40 Sent 75 5410.588975 5410.588975 9: seq: 1b, identify offset=3000 count=40 Sent 76 5410.589889 5410.589889 9: seq: 1c, identify offset=3040 count=40 Sent 77 5410.590783 5410.590783 9: seq: 1d, identify offset=3080 count=40 Sent 78 5410.591667 5410.591667 9: seq: 1e, identify offset=3095 count=40 Sent 79 5410.711795 5410.711795 6: seq: 1f, get_uptime Sent 80 5410.763666 5410.763666 6: seq: 10, get_clock Sent 81 5410.814648 5410.814648 6: seq: 11, get_clock Sent 82 5410.865792 5410.865792 6: seq: 12, get_clock Sent 83 5410.916804 5410.916804 6: seq: 13, get_clock Sent 84 5410.967744 5410.967744 6: seq: 14, get_clock Sent 85 5411.018759 5411.018759 6: seq: 15, get_clock Sent 86 5411.069853 5411.069853 6: seq: 16, get_clock Sent 87 5411.121018 5411.121018 6: seq: 17, get_clock Sent 88 5411.124097 5411.124097 6: seq: 18, get_clock Sent 89 5411.145139 5411.145139 6: seq: 19, get_config Sent 90 5411.147270 5411.147270 9: seq: 1a, allocate_oids count=2, config_spi_without_cs oid=0 Sent 91 5411.147410 5411.147410 8: seq: 1b, config_adxl345 oid=1 spi_oid=0 Sent 92 5411.147518 5411.147518 13: seq: 1c, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Sent 93 5411.147606 5411.147606 11: seq: 1d, finalize_config crc=4031677248 Sent 94 5411.147766 5411.147766 6: seq: 1e, get_config Dumping receive queue 94 messages Receive: 0 5410.508084 0.000000 6: seq: 10, starting Receive: 1 5410.508088 0.000000 11: seq: 10, stats count=51 sum=9365 sumsq=7666 Receive: 2 5410.508091 0.000000 12: seq: 10, stats count=50 sum=10364 sumsq=20825 Receive: 3 5410.510448 5410.510100 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 4 5410.512140 5410.511885 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 5 5410.513315 5410.513091 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 6 5410.514449 5410.514222 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 7 5410.515512 5410.515298 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 8 5410.516565 5410.516342 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 9 5410.517619 5410.517401 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 10 5410.518673 5410.518455 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 11 5410.519727 5410.519511 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 12 5410.520775 5410.520558 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 13 5410.521864 5410.521609 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 14 5410.523008 5410.522710 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 15 5410.524352 5410.524087 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 16 5410.525504 5410.525206 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 17 5410.526443 5410.526254 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 18 5410.527351 5410.527167 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 19 5410.528349 5410.528073 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 20 5410.529396 5410.529206 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 21 5410.530315 5410.530125 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 22 5410.531223 5410.531040 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 23 5410.532122 5410.531938 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 24 5410.533071 5410.532825 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 25 5410.534076 5410.533869 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 26 5410.535002 5410.534815 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 27 5410.535913 5410.535729 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 28 5410.536820 5410.536625 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 29 5410.537718 5410.537536 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 30 5410.538618 5410.538434 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 31 5410.539539 5410.539333 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 32 5410.540448 5410.540254 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 33 5410.541347 5410.541165 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 34 5410.542239 5410.542054 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 35 5410.543198 5410.543008 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 36 5410.544168 5410.543961 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 37 5410.545090 5410.544908 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 38 5410.546319 5410.546119 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 39 5410.547258 5410.547073 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 40 5410.548159 5410.547975 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 41 5410.549066 5410.548870 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 42 5410.549951 5410.549770 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 43 5410.550844 5410.550661 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 44 5410.551725 5410.551542 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 45 5410.552614 5410.552433 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 46 5410.553763 5410.553571 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 47 5410.554840 5410.554605 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 48 5410.555823 5410.555626 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 49 5410.558408 5410.558163 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 50 5410.559370 5410.559181 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 51 5410.560294 5410.560097 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 52 5410.561202 5410.561016 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 53 5410.562109 5410.561923 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 54 5410.563080 5410.562819 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 55 5410.564092 5410.563900 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 56 5410.565006 5410.564824 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 57 5410.565909 5410.565724 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 58 5410.567986 5410.567726 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 59 5410.571056 5410.570806 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 60 5410.572254 5410.572056 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 61 5410.573265 5410.573076 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 62 5410.574197 5410.573997 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 63 5410.575101 5410.574918 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 64 5410.575999 5410.575815 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 65 5410.576895 5410.576711 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 66 5410.577799 5410.577601 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 67 5410.578706 5410.578523 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 68 5410.579627 5410.579420 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 69 5410.580826 5410.580627 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 70 5410.581792 5410.581592 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 71 5410.582727 5410.582545 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 72 5410.583721 5410.583529 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 73 5410.584644 5410.584456 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 74 5410.585556 5410.585358 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 75 5410.586464 5410.586278 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968998360: New connection webhooks client 1968998360: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} mcu 'mcu': got {'#receive_time': 5523.35437909, u'next_clock': 1030563520, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5523.324902945} mcu 'mcu': got {'#receive_time': 5523.545000965, u'next_clock': 1064763520, u'oid': 22, u'value': 31606, '#name': u'analog_in_state', '#sent_time': 5523.531193361} mcu 'mcu': got {'#receive_time': 5523.655375705, u'next_clock': 1084563520, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5523.634667372} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect mcu 'mcu': got {'#receive_time': 5523.844588986, u'next_clock': 1118763520, u'oid': 22, u'value': 31607, '#name': u'analog_in_state', '#sent_time': 5523.692064455} mcu 'mcu': got {'#receive_time': 5523.954642319, u'next_clock': 1138563520, u'oid': 33, u'value': 31617, '#name': u'analog_in_state', '#sent_time': 5523.692064455} mcu 'mcu': got {'#receive_time': 5524.144767684, u'next_clock': 1172763520, u'oid': 22, u'value': 31604, '#name': u'analog_in_state', '#sent_time': 5523.692064455} mcu 'rpi': got {u'count': 139, '#receive_time': 5524.208292892, u'sum': 222361, u'sumsq': 2177470, '#name': u'stats', '#sent_time': 5524.208123465} mcu 'mcu': got {'#receive_time': 5524.254943361, u'next_clock': 1192563520, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5523.692064455} Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 MCU error during connect Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 180, in _connect cb() File "/home/pi/klipper/klippy/mcu.py", line 726, in _connect config_params = self._send_get_config() File "/home/pi/klipper/klippy/mcu.py", line 713, in _send_get_config self._name,)) error: Can not update MCU 'mcu' config as it is shutdown Build file /home/pi/klipper/klippy/../.config(680): Thu Feb 9 14:30:48 2023 ========= Last MCU build config ========= # CONFIG_LOW_LEVEL_OPTIONS is not set # CONFIG_MACH_AVR is not set # CONFIG_MACH_ATSAM is not set # CONFIG_MACH_ATSAMD is not set # CONFIG_MACH_LPC176X is not set # CONFIG_MACH_STM32 is not set # CONFIG_MACH_RP2040 is not set # CONFIG_MACH_PRU is not set CONFIG_MACH_LINUX=y # CONFIG_MACH_SIMU is not set CONFIG_BOARD_DIRECTORY="linux" CONFIG_CLOCK_FREQ=50000000 CONFIG_LINUX_SELECT=y CONFIG_USB_VENDOR_ID=0x1d50 CONFIG_USB_DEVICE_ID=0x614e CONFIG_USB_SERIAL_NUMBER="12345" CONFIG_CANBUS_FREQUENCY=500000 CONFIG_HAVE_GPIO=y CONFIG_HAVE_GPIO_ADC=y CONFIG_HAVE_GPIO_SPI=y CONFIG_HAVE_GPIO_I2C=y CONFIG_HAVE_GPIO_HARD_PWM=y CONFIG_HAVE_GPIO_BITBANGING=y CONFIG_INLINE_STEPPER_HACK=y ======================= Build file /home/pi/klipper/klippy/../out/klipper.dict(9213): Thu Feb 9 14:32:17 2023 Last MCU build version: v0.11.0-101-g17f7c039 Last MCU build tools: gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1 Last MCU build config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Build file /home/pi/klipper/klippy/../out/klipper.elf(582512): Thu Feb 9 14:32:29 2023 mcu 'mcu': got {'#receive_time': 5524.445150965, u'next_clock': 1226763520, u'oid': 22, u'value': 31602, '#name': u'analog_in_state', '#sent_time': 5524.313886746} mcu 'mcu': got {'#receive_time': 5524.555457267, u'next_clock': 1246563520, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5524.313886746} mcu 'mcu': got {'#receive_time': 5524.74444685, u'next_clock': 1280763520, u'oid': 22, u'value': 31606, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5524.854591954, u'next_clock': 1300563520, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.044739559, u'next_clock': 1334763520, u'oid': 22, u'value': 31599, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.154837788, u'next_clock': 1354563520, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.344919715, u'next_clock': 1388763520, u'oid': 22, u'value': 31597, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.455122683, u'next_clock': 1408563520, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.645208933, u'next_clock': 1442763520, u'oid': 22, u'value': 31601, '#name': u'analog_in_state', '#sent_time': 5524.67676383} mcu 'mcu': got {'#receive_time': 5525.755446069, u'next_clock': 1462563520, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5525.944335496, u'next_clock': 1496763520, u'oid': 22, u'value': 31601, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5526.054480756, u'next_clock': 1516563520, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5526.244589141, u'next_clock': 1550763520, u'oid': 22, u'value': 31597, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5526.354718725, u'next_clock': 1570563520, u'oid': 33, u'value': 31617, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5526.544838725, u'next_clock': 1604763520, u'oid': 22, u'value': 31597, '#name': u'analog_in_state', '#sent_time': 5525.661520756} mcu 'mcu': got {'#receive_time': 5526.6550481, u'next_clock': 1624563520, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5526.845214037, u'next_clock': 1658763520, u'oid': 22, u'value': 31595, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5526.955328516, u'next_clock': 1678563520, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5527.145474558, u'next_clock': 1712763520, u'oid': 22, u'value': 31594, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5527.254387526, u'next_clock': 1732563520, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5527.444446433, u'next_clock': 1766763520, u'oid': 22, u'value': 31596, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5527.55458336, u'next_clock': 1786563520, u'oid': 33, u'value': 31614, '#name': u'analog_in_state', '#sent_time': 5526.646665183} mcu 'mcu': got {'#receive_time': 5527.74483888, u'next_clock': 1820763520, u'oid': 22, u'value': 31592, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5527.855000703, u'next_clock': 1840563520, u'oid': 33, u'value': 31617, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5528.045097318, u'next_clock': 1874763520, u'oid': 22, u'value': 31597, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5528.155219141, u'next_clock': 1894563520, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5528.345308359, u'next_clock': 1928763520, u'oid': 22, u'value': 31591, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5528.454201536, u'next_clock': 1948563520, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5527.631440235} mcu 'mcu': got {'#receive_time': 5528.644434245, u'next_clock': 1982763520, u'oid': 22, u'value': 31590, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5528.754584974, u'next_clock': 2002563520, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5528.944720859, u'next_clock': 2036763520, u'oid': 22, u'value': 31594, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5529.054844245, u'next_clock': 2056563520, u'oid': 33, u'value': 31626, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5529.244966692, u'next_clock': 2090763520, u'oid': 22, u'value': 31590, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5529.355085286, u'next_clock': 2110563520, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5529.545324401, u'next_clock': 2144763520, u'oid': 22, u'value': 31590, '#name': u'analog_in_state', '#sent_time': 5528.616195963} mcu 'mcu': got {'#receive_time': 5529.65432039, u'next_clock': 2164563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5529.84443664, u'next_clock': 2198763520L, u'oid': 22, u'value': 31590, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5529.954592369, u'next_clock': 2218563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5530.144722838, u'next_clock': 2252763520L, u'oid': 22, u'value': 31588, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5530.254825911, u'next_clock': 2272563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5530.444951952, u'next_clock': 2306763520L, u'oid': 22, u'value': 31594, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5530.555087004, u'next_clock': 2326563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5529.600420703} mcu 'mcu': got {'#receive_time': 5530.7453319, u'next_clock': 2360763520L, u'oid': 22, u'value': 31590, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5530.854221744, u'next_clock': 2380563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5531.044382525, u'next_clock': 2414763520L, u'oid': 22, u'value': 31589, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5531.154459348, u'next_clock': 2434563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5531.344597056, u'next_clock': 2468763520L, u'oid': 22, u'value': 31586, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5531.45469466, u'next_clock': 2488563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5530.584468202} mcu 'mcu': got {'#receive_time': 5531.644957264, u'next_clock': 2522763520L, u'oid': 22, u'value': 31584, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5531.755088046, u'next_clock': 2542563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5531.945212629, u'next_clock': 2576763520L, u'oid': 22, u'value': 31586, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5532.0553419, u'next_clock': 2596563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5532.244220806, u'next_clock': 2630763520L, u'oid': 22, u'value': 31586, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5532.354337837, u'next_clock': 2650563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5532.544474139, u'next_clock': 2684763520L, u'oid': 22, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 5531.568643567} mcu 'mcu': got {'#receive_time': 5532.654713306, u'next_clock': 2704563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5532.84486242, u'next_clock': 2738763520L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5532.954953618, u'next_clock': 2758563520L, u'oid': 33, u'value': 31625, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5533.145102055, u'next_clock': 2792763520L, u'oid': 22, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5533.255239295, u'next_clock': 2812563520L, u'oid': 33, u'value': 31624, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5533.445329816, u'next_clock': 2846763520L, u'oid': 22, u'value': 31582, '#name': u'analog_in_state', '#sent_time': 5532.55277867} mcu 'mcu': got {'#receive_time': 5533.554342264, u'next_clock': 2866563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5533.744491534, u'next_clock': 2900763520L, u'oid': 22, u'value': 31580, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5533.854614347, u'next_clock': 2920563520L, u'oid': 33, u'value': 31615, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5534.044756638, u'next_clock': 2954763520L, u'oid': 22, u'value': 31583, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5534.154861899, u'next_clock': 2974563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5534.345001795, u'next_clock': 3008763520L, u'oid': 22, u'value': 31578, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5534.455144659, u'next_clock': 3028563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5533.537556535} mcu 'mcu': got {'#receive_time': 5534.644207211, u'next_clock': 3062763520L, u'oid': 22, u'value': 31579, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5534.754335909, u'next_clock': 3082563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5534.944462211, u'next_clock': 3116763520L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5535.054569451, u'next_clock': 3136563520L, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5535.244699711, u'next_clock': 3170763520L, u'oid': 22, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5535.354822419, u'next_clock': 3190563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5534.522370753} mcu 'mcu': got {'#receive_time': 5535.545082211, u'next_clock': 3224763520L, u'oid': 22, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5535.655211377, u'next_clock': 3244563520L, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5535.844166898, u'next_clock': 3278763520L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5535.954320961, u'next_clock': 3298563520L, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5536.144424242, u'next_clock': 3332763520L, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5536.254587992, u'next_clock': 3352563520L, u'oid': 33, u'value': 31623, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5536.444717002, u'next_clock': 3386763520L, u'oid': 22, u'value': 31577, '#name': u'analog_in_state', '#sent_time': 5535.507615857} mcu 'mcu': got {'#receive_time': 5536.554949033, u'next_clock': 3406563520L, u'oid': 33, u'value': 31617, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5536.745091794, u'next_clock': 3440763520L, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5536.855220752, u'next_clock': 3460563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5537.044092575, u'next_clock': 3494763520L, u'oid': 22, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5537.154170179, u'next_clock': 3514563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5537.344360752, u'next_clock': 3548763520L, u'oid': 22, u'value': 31575, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5537.454452627, u'next_clock': 3568563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5536.492719554} mcu 'mcu': got {'#receive_time': 5537.644725075, u'next_clock': 3602763520L, u'oid': 22, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5537.75484747, u'next_clock': 3622563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5537.944972835, u'next_clock': 3656763520L, u'oid': 22, u'value': 31576, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5538.055089554, u'next_clock': 3676563520L, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5538.245225699, u'next_clock': 3710763520L, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5538.354066481, u'next_clock': 3730563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5537.477462731} mcu 'mcu': got {'#receive_time': 5538.544356637, u'next_clock': 3764763520L, u'oid': 22, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5538.654461689, u'next_clock': 3784563520L, u'oid': 33, u'value': 31623, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5538.844594189, u'next_clock': 3818763520L, u'oid': 22, u'value': 31574, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5538.954698928, u'next_clock': 3838563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5539.144829189, u'next_clock': 3872763520L, u'oid': 22, u'value': 31573, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5539.254964761, u'next_clock': 3892563520L, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5539.445071168, u'next_clock': 3926763520L, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 5538.462627835} mcu 'mcu': got {'#receive_time': 5539.55418523, u'next_clock': 3946563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5539.74433497, u'next_clock': 3980763520L, u'oid': 22, u'value': 31572, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5539.854460282, u'next_clock': 4000563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5540.04459372, u'next_clock': 4034763520L, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5540.154680542, u'next_clock': 4054563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5540.344835334, u'next_clock': 4088763520L, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 5539.447632626} mcu 'mcu': got {'#receive_time': 5540.455032417, u'next_clock': 4108563520L, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5540.645230646, u'next_clock': 4142763520L, u'oid': 22, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5540.754097001, u'next_clock': 4162563520L, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5540.944234396, u'next_clock': 4196763520L, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5541.054401375, u'next_clock': 4216563520L, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5541.244503511, u'next_clock': 4250763520L, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5541.354592469, u'next_clock': 4270563520L, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5540.432664709} mcu 'mcu': got {'#receive_time': 5541.544835594, u'next_clock': 9796224, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5541.654966063, u'next_clock': 29596224, u'oid': 33, u'value': 31616, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5541.845093146, u'next_clock': 63796224, u'oid': 22, u'value': 31571, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5541.955225385, u'next_clock': 83596224, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5542.144088302, u'next_clock': 117796224, u'oid': 22, u'value': 31568, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5542.254215958, u'next_clock': 137596224, u'oid': 33, u'value': 31621, '#name': u'analog_in_state', '#sent_time': 5541.417646844} mcu 'mcu': got {'#receive_time': 5542.444457469, u'next_clock': 171796224, u'oid': 22, u'value': 31567, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5542.554586219, u'next_clock': 191596224, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5542.744717468, u'next_clock': 225796224, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5542.85484851, u'next_clock': 245596224, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5543.044939083, u'next_clock': 279796224, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5543.155082468, u'next_clock': 299596224, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5543.345195281, u'next_clock': 333796224, u'oid': 22, u'value': 31566, '#name': u'analog_in_state', '#sent_time': 5542.401897156} mcu 'mcu': got {'#receive_time': 5543.454211947, u'next_clock': 353596224, u'oid': 33, u'value': 31619, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5543.644339864, u'next_clock': 387796224, u'oid': 22, u'value': 31564, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5543.754466531, u'next_clock': 407596224, u'oid': 33, u'value': 31618, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5543.944595385, u'next_clock': 441796224, u'oid': 22, u'value': 31569, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5544.054718458, u'next_clock': 461596224, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5544.24484403, u'next_clock': 495796224, u'oid': 22, u'value': 31565, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5544.354970749, u'next_clock': 515596224, u'oid': 33, u'value': 31620, '#name': u'analog_in_state', '#sent_time': 5543.386076687} mcu 'mcu': got {'#receive_time': 5544.543987937, u'next_clock': 549796224, u'oid': 22, u'value': 31570, '#name': u'analog_in_state', '#sent_time': 5544.370666218} mcu 'mcu': got {'#receive_time': 5544.654241895, u'next_clock': 569596224, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5544.370666218} mcu 'mcu': got {'#receive_time': 5544.844351582, u'next_clock': 603796224, u'oid': 22, u'value': 31563, '#name': u'analog_in_state', '#sent_time': 5544.370666218} mcu 'mcu': got {'#receive_time': 5544.954493509, u'next_clock': 623596224, u'oid': 33, u'value': 31622, '#name': u'analog_in_state', '#sent_time': 5544.370666218} Attempting MCU 'mcu' reset command Attempting MCU 'rpi' config_reset command Got EOF when reading from device webhooks client 1968998360: Disconnected Restarting printer Start printer at Thu Feb 9 16:11:48 2023 (1675977108.6 5546.2) 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 134, in _read_config config = pconfig.read_main_config() File "/home/pi/klipper/klippy/configfile.py", line 277, in read_main_config regular_config = self._build_config_wrapper(regular_data, filename) File "/home/pi/klipper/klippy/configfile.py", line 264, in _build_config_wrapper self._parse_config(data, filename, fileconfig, set()) File "/home/pi/klipper/klippy/configfile.py", line 250, in _parse_config self._parse_config_buffer(buffer, filename, fileconfig) File "/home/pi/klipper/klippy/configfile.py", line 216, in _parse_config_buffer fileconfig.readfp(sbuffer, filename) File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp self._read(fp, filename) File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read raise MissingSectionHeaderError(fpname, lineno, line) MissingSectionHeaderError: File contains no section headers. file: /home/pi/klipper_config/printer.cfg, line: 26 'serial: /tmp/klipper_host_mcu\n' webhooks client 1971456720: New connection webhooks client 1971456720: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} webhooks client 1971456720: Disconnected Restarting printer Start printer at Thu Feb 9 16:12:03 2023 (1675977123.6 5561.2) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968609120: New connection webhooks client 1968609120: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Starting heater checks for heater_bed Starting heater checks for extruder Stats 5564.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3355 bytes_read=6437 bytes_retransmit=9 bytes_invalid=0 send_seq=278 receive_seq=278 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179991198 heater_bed: target=0 temp=0.0 pwm=0.000 sysload=2.36 cputime=7.527 memavail=761388 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 webhooks: registering remote method 'shutdown_machine' for connection id: 1968609120 webhooks: registering remote method 'reboot_machine' for connection id: 1968609120 webhooks: registering remote method 'pause_job_queue' for connection id: 1968609120 webhooks: registering remote method 'start_job_queue' for connection id: 1968609120 Stats 5565.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3361 bytes_read=6483 bytes_retransmit=9 bytes_invalid=0 send_seq=279 receive_seq=279 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002097 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.36 cputime=7.578 memavail=760796 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 5566.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3367 bytes_read=6604 bytes_retransmit=9 bytes_invalid=0 send_seq=280 receive_seq=280 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002257 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.36 cputime=7.608 memavail=760876 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5567.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3373 bytes_read=6740 bytes_retransmit=9 bytes_invalid=0 send_seq=281 receive_seq=281 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002626 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.41 cputime=7.632 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5568.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3379 bytes_read=6846 bytes_retransmit=9 bytes_invalid=0 send_seq=282 receive_seq=282 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002871 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.41 cputime=7.656 memavail=760784 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5569.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3385 bytes_read=6967 bytes_retransmit=9 bytes_invalid=0 send_seq=283 receive_seq=283 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002985 heater_bed: target=0 temp=19.0 pwm=0.000 sysload=2.41 cputime=7.679 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5570.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3391 bytes_read=7086 bytes_retransmit=9 bytes_invalid=0 send_seq=284 receive_seq=284 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002942 heater_bed: target=0 temp=19.1 pwm=0.000 sysload=2.41 cputime=7.702 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5571.0: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000006 bytes_write=3397 bytes_read=7185 bytes_retransmit=9 bytes_invalid=0 send_seq=285 receive_seq=285 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002918 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.41 cputime=7.725 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5572.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3403 bytes_read=7317 bytes_retransmit=9 bytes_invalid=0 send_seq=286 receive_seq=286 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002982 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.46 cputime=7.748 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5573.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3409 bytes_read=7438 bytes_retransmit=9 bytes_invalid=0 send_seq=287 receive_seq=287 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003036 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.46 cputime=7.772 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5574.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3415 bytes_read=7544 bytes_retransmit=9 bytes_invalid=0 send_seq=288 receive_seq=288 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003025 heater_bed: target=0 temp=19.2 pwm=0.000 sysload=2.46 cputime=7.795 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5575.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3421 bytes_read=7665 bytes_retransmit=9 bytes_invalid=0 send_seq=289 receive_seq=289 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003016 heater_bed: target=0 temp=19.3 pwm=0.000 sysload=2.46 cputime=7.819 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5576.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3427 bytes_read=7786 bytes_retransmit=9 bytes_invalid=0 send_seq=290 receive_seq=290 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003030 heater_bed: target=0 temp=19.4 pwm=0.000 sysload=2.46 cputime=7.842 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5577.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3433 bytes_read=7906 bytes_retransmit=9 bytes_invalid=0 send_seq=291 receive_seq=291 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002976 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.50 cputime=7.865 memavail=760868 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5578.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3439 bytes_read=8027 bytes_retransmit=9 bytes_invalid=0 send_seq=292 receive_seq=292 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002961 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.50 cputime=7.888 memavail=761044 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5579.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3445 bytes_read=8148 bytes_retransmit=9 bytes_invalid=0 send_seq=293 receive_seq=293 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002957 heater_bed: target=0 temp=19.5 pwm=0.000 sysload=2.50 cputime=7.912 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5580.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3451 bytes_read=8254 bytes_retransmit=9 bytes_invalid=0 send_seq=294 receive_seq=294 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002938 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=2.50 cputime=7.935 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5581.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3457 bytes_read=8375 bytes_retransmit=9 bytes_invalid=0 send_seq=295 receive_seq=295 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002931 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=2.50 cputime=7.958 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5582.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3463 bytes_read=8510 bytes_retransmit=9 bytes_invalid=0 send_seq=296 receive_seq=296 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002912 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=2.54 cputime=7.982 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5583.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3469 bytes_read=8616 bytes_retransmit=9 bytes_invalid=0 send_seq=297 receive_seq=297 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002900 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.54 cputime=8.005 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5584.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3475 bytes_read=8737 bytes_retransmit=9 bytes_invalid=0 send_seq=298 receive_seq=298 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002907 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.54 cputime=8.028 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5585.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3487 bytes_read=8874 bytes_retransmit=9 bytes_invalid=0 send_seq=300 receive_seq=300 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002925 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.54 cputime=8.052 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5586.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3493 bytes_read=8980 bytes_retransmit=9 bytes_invalid=0 send_seq=301 receive_seq=301 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002922 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.54 cputime=8.076 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5587.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3499 bytes_read=9115 bytes_retransmit=9 bytes_invalid=0 send_seq=302 receive_seq=302 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002914 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.58 cputime=8.099 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5588.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3505 bytes_read=9236 bytes_retransmit=9 bytes_invalid=0 send_seq=303 receive_seq=303 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002904 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.58 cputime=8.122 memavail=761120 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5589.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3511 bytes_read=9342 bytes_retransmit=9 bytes_invalid=0 send_seq=304 receive_seq=304 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002903 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.58 cputime=8.145 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5590.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3517 bytes_read=9463 bytes_retransmit=9 bytes_invalid=0 send_seq=305 receive_seq=305 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002906 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.58 cputime=8.169 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5591.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3523 bytes_read=9584 bytes_retransmit=9 bytes_invalid=0 send_seq=306 receive_seq=306 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002901 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.58 cputime=8.193 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5592.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3529 bytes_read=9704 bytes_retransmit=9 bytes_invalid=0 send_seq=307 receive_seq=307 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002894 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.69 cputime=8.217 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5593.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3535 bytes_read=9825 bytes_retransmit=9 bytes_invalid=0 send_seq=308 receive_seq=308 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002896 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.69 cputime=8.241 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.3 pwm=0.000 Stats 5594.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3541 bytes_read=9941 bytes_retransmit=9 bytes_invalid=0 send_seq=309 receive_seq=309 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002889 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.69 cputime=8.264 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5595.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3547 bytes_read=10040 bytes_retransmit=9 bytes_invalid=0 send_seq=310 receive_seq=310 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002896 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.69 cputime=8.288 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5596.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3553 bytes_read=10160 bytes_retransmit=9 bytes_invalid=0 send_seq=311 receive_seq=311 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002897 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.69 cputime=8.312 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5597.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3559 bytes_read=10295 bytes_retransmit=9 bytes_invalid=0 send_seq=312 receive_seq=312 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002891 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.88 cputime=8.334 memavail=761128 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5598.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3565 bytes_read=10401 bytes_retransmit=9 bytes_invalid=0 send_seq=313 receive_seq=313 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002901 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.88 cputime=8.356 memavail=760604 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5599.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3571 bytes_read=10522 bytes_retransmit=9 bytes_invalid=0 send_seq=314 receive_seq=314 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002901 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.88 cputime=8.380 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5600.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3577 bytes_read=10643 bytes_retransmit=9 bytes_invalid=0 send_seq=315 receive_seq=315 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002911 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.88 cputime=8.405 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5601.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3583 bytes_read=10749 bytes_retransmit=9 bytes_invalid=0 send_seq=316 receive_seq=316 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002903 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.88 cputime=8.428 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5602.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3589 bytes_read=10884 bytes_retransmit=9 bytes_invalid=0 send_seq=317 receive_seq=317 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002896 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.89 cputime=8.448 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5603.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3595 bytes_read=11005 bytes_retransmit=9 bytes_invalid=0 send_seq=318 receive_seq=318 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002892 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.89 cputime=8.473 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5604.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3601 bytes_read=11111 bytes_retransmit=9 bytes_invalid=0 send_seq=319 receive_seq=319 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002889 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.89 cputime=8.497 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 5605.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3607 bytes_read=11232 bytes_retransmit=9 bytes_invalid=0 send_seq=320 receive_seq=320 retransmit_seq=2 srtt=0.001 rttvar=0.001 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002883 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=2.89 cputime=8.521 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 Stats 5606.0: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3613 bytes_read=11353 bytes_retransmit=9 bytes_invalid=0 send_seq=321 receive_seq=321 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002878 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=2.89 cputime=8.545 memavail=760628 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.4 pwm=0.000 webhooks client 1968609120: Disconnected webhooks client 1968858096: New connection webhooks client 1968858096: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} webhooks: registering remote method 'shutdown_machine' for connection id: 1968858096 webhooks: registering remote method 'reboot_machine' for connection id: 1968858096 webhooks: registering remote method 'pause_job_queue' for connection id: 1968858096 webhooks: registering remote method 'start_job_queue' for connection id: 1968858096 Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.11.0-101-g17f7c039' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Thu Feb 9 16:17:19 2023 (1675977439.3 25.8) ===== Config file ===== [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) webhooks client 1970441952: New connection Starting heater checks for heater_bed webhooks client 1970441952: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Starting heater checks for extruder Stats 29.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=3355 bytes_read=6437 bytes_retransmit=9 bytes_invalid=0 send_seq=278 receive_seq=278 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=179997635 heater_bed: target=0 temp=0.0 pwm=0.000 sysload=1.40 cputime=3.104 memavail=774424 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 webhooks: registering remote method 'shutdown_machine' for connection id: 1970441952 webhooks: registering remote method 'reboot_machine' for connection id: 1970441952 webhooks: registering remote method 'pause_job_queue' for connection id: 1970441952 webhooks: registering remote method 'start_job_queue' for connection id: 1970441952 Stats 30.7: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3361 bytes_read=6558 bytes_retransmit=9 bytes_invalid=0 send_seq=279 receive_seq=279 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180005469 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=1.61 cputime=3.139 memavail=772760 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 31.7: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3367 bytes_read=6679 bytes_retransmit=9 bytes_invalid=0 send_seq=280 receive_seq=280 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003363 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=1.61 cputime=3.187 memavail=769576 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 32.7: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3373 bytes_read=6800 bytes_retransmit=9 bytes_invalid=0 send_seq=281 receive_seq=281 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003287 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=1.61 cputime=3.204 memavail=768520 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 33.7: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3379 bytes_read=6906 bytes_retransmit=9 bytes_invalid=0 send_seq=282 receive_seq=282 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002900 heater_bed: target=0 temp=19.6 pwm=0.000 sysload=1.61 cputime=3.221 memavail=768560 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 34.7: gcodein=0 mcu: mcu_awake=0.006 mcu_task_avg=0.000006 mcu_task_stddev=0.000007 bytes_write=3385 bytes_read=7027 bytes_retransmit=9 bytes_invalid=0 send_seq=283 receive_seq=283 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002922 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=1.61 cputime=3.239 memavail=768300 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 35.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3391 bytes_read=7162 bytes_retransmit=9 bytes_invalid=0 send_seq=284 receive_seq=284 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002864 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=1.72 cputime=3.257 memavail=768280 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 36.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3397 bytes_read=7268 bytes_retransmit=9 bytes_invalid=0 send_seq=285 receive_seq=285 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002854 heater_bed: target=0 temp=19.7 pwm=0.000 sysload=1.72 cputime=3.273 memavail=768224 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 37.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3403 bytes_read=7389 bytes_retransmit=9 bytes_invalid=0 send_seq=286 receive_seq=286 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002716 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=1.72 cputime=3.308 memavail=767660 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 38.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3409 bytes_read=7510 bytes_retransmit=9 bytes_invalid=0 send_seq=287 receive_seq=287 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002725 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=1.72 cputime=3.333 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 39.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3415 bytes_read=7616 bytes_retransmit=9 bytes_invalid=0 send_seq=288 receive_seq=288 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002731 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=1.72 cputime=3.357 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 40.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3421 bytes_read=7751 bytes_retransmit=9 bytes_invalid=0 send_seq=289 receive_seq=289 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002729 heater_bed: target=0 temp=19.8 pwm=0.000 sysload=1.82 cputime=3.382 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 41.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3427 bytes_read=7872 bytes_retransmit=9 bytes_invalid=0 send_seq=290 receive_seq=290 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002762 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=1.82 cputime=3.407 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 42.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3433 bytes_read=7992 bytes_retransmit=9 bytes_invalid=0 send_seq=291 receive_seq=291 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002777 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=1.82 cputime=3.425 memavail=767648 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 43.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3439 bytes_read=8091 bytes_retransmit=9 bytes_invalid=0 send_seq=292 receive_seq=292 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002739 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=1.82 cputime=3.445 memavail=767656 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 44.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3445 bytes_read=8208 bytes_retransmit=9 bytes_invalid=0 send_seq=293 receive_seq=293 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002794 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=1.82 cputime=3.470 memavail=767664 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 45.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3451 bytes_read=8343 bytes_retransmit=9 bytes_invalid=0 send_seq=294 receive_seq=294 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003060 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=1.92 cputime=3.491 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 46.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3463 bytes_read=8465 bytes_retransmit=9 bytes_invalid=0 send_seq=296 receive_seq=296 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180003007 heater_bed: target=0 temp=19.9 pwm=0.000 sysload=1.92 cputime=3.514 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 47.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3469 bytes_read=8586 bytes_retransmit=9 bytes_invalid=0 send_seq=297 receive_seq=297 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002974 heater_bed: target=0 temp=20.0 pwm=0.000 sysload=1.92 cputime=3.539 memavail=767624 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 48.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3475 bytes_read=8707 bytes_retransmit=9 bytes_invalid=0 send_seq=298 receive_seq=298 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002933 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=1.92 cputime=3.561 memavail=768340 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 49.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3481 bytes_read=8813 bytes_retransmit=9 bytes_invalid=0 send_seq=299 receive_seq=299 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002911 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=1.92 cputime=3.581 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 50.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3487 bytes_read=8934 bytes_retransmit=9 bytes_invalid=0 send_seq=300 receive_seq=300 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002899 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.08 cputime=3.606 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 51.7: gcodein=0 mcu: mcu_awake=0.001 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3493 bytes_read=9069 bytes_retransmit=9 bytes_invalid=0 send_seq=301 receive_seq=301 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002892 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.08 cputime=3.630 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.7 pwm=0.000 Stats 52.7: gcodein=0 mcu: mcu_awake=0.001 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3499 bytes_read=9190 bytes_retransmit=9 bytes_invalid=0 send_seq=302 receive_seq=302 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002855 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.08 cputime=3.650 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 53.7: gcodein=0 mcu: mcu_awake=0.001 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3505 bytes_read=9296 bytes_retransmit=9 bytes_invalid=0 send_seq=303 receive_seq=303 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002862 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.08 cputime=3.671 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Stats 54.7: gcodein=0 mcu: mcu_awake=0.001 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3511 bytes_read=9417 bytes_retransmit=9 bytes_invalid=0 send_seq=304 receive_seq=304 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002862 heater_bed: target=0 temp=20.2 pwm=0.000 sysload=2.08 cputime=3.696 memavail=768412 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=19.5 pwm=0.000 Stats 63.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000004 mcu_task_stddev=0.000004 bytes_write=3565 bytes_read=10489 bytes_retransmit=9 bytes_invalid=0 send_seq=313 receive_seq=313 retransmit_seq=2 srtt=0.001 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=180002885 heater_bed: target=0 temp=20.1 pwm=0.000 sysload=2.23 cputime=3.904 memavail=767920 print_time=68.984 buffer_time=0.838 print_stall=0 extruder: target=0 temp=19.6 pwm=0.000 Attempting MCU 'mcu' reset command webhooks client 1970441952: Disconnected Restarting printer Start printer at Thu Feb 9 16:18:46 2023 (1675977526.2 65.7) ===== Config file ===== [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= 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/adxl345.py", line 442, in load_config return ADXL345(config) File "/home/pi/klipper/klippy/extras/adxl345.py", line 248, in __init__ self.spi = bus.MCU_SPI_from_config(config, 3, default_speed=5000000) File "/home/pi/klipper/klippy/extras/bus.py", line 113, in MCU_SPI_from_config cs_pin_params = ppins.lookup_pin(cs_pin, share_type=share_type) File "/home/pi/klipper/klippy/pins.py", line 98, in lookup_pin pin_params = self.parse_pin(pin_desc, can_invert, can_pullup) File "/home/pi/klipper/klippy/pins.py", line 83, in parse_pin raise error("Unknown pin chip name '%s'" % (chip_name,)) error: Unknown pin chip name 'rpi' webhooks client 1968443264: New connection webhooks client 1968443264: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Unable to issue reset command on MCU 'mcu' webhooks client 1968443264: Disconnected Restarting printer Start printer at Thu Feb 9 16:19:03 2023 (1675977543.1 82.6) ===== Config file ===== [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f446xx_13004100155053424E363620-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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_x] uart_pin = PC4 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = 300 position_max = 300 homing_speed = 50 homing_retract_dist = 5 homing_positive_dir = true [tmc2209 stepper_y] uart_pin = PD11 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [stepper_z] step_pin = PF11 dir_pin = PG3 enable_pin = !PG5 rotation_distance = 40 gear_ratio = 80:16 microsteps = 32 endstop_pin = !PG10 position_max = 280 position_min = -5 homing_speed = 8 second_homing_speed = 3 homing_retract_dist = 3 position_endstop = 1.980 [tmc2209 stepper_z] uart_pin = PC6 interpolate = false run_current = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [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 = .9 sense_resistor = 0.110 stealthchop_threshold = 999999 [extruder] step_pin = PE2 dir_pin = PE3 enable_pin = !PD4 rotation_distance = 35.23 gear_ratio = 7.5:1 microsteps = 32 full_steps_per_rotation = 200 nozzle_diameter = 0.400 filament_diameter = 1.75 max_extrude_only_distance = 100.0 heater_pin = PA2 sensor_type = ATC Semitec 104GT-2 sensor_pin = PF4 min_temp = 10 max_temp = 270 max_power = 1 min_extrude_temp = 170 control = pid pid_kp = 33.398 pid_ki = 1.767 pid_kd = 157.805 pressure_advance = 0.02 pressure_advance_smooth_time = 0.040 max_extrude_only_velocity = 60 [tmc2209 extruder] uart_pin = PE1 interpolate = false run_current = .35 sense_resistor = 0.110 stealthchop_threshold = 999999 [heater_bed] heater_pin = PA3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PF3 max_power = 1 min_temp = 10 max_temp = 120 control = pid pid_kp = 28.038 pid_ki = 1.038 pid_kd = 189.256 [probe] pin = PG15 x_offset = 0 y_offset = 19.75 z_offset = 6.9 speed = 50 samples = 3 samples_result = median sample_retract_dist = 5.0 samples_tolerance = 0.05 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 [idle_timeout] timeout = 1800 [quad_gantry_level] gantry_corners = -60,-10 360,370 points = 50,25 50,225 250,225 250,25 speed = 100 horizontal_move_z = 15 retries = 5 retry_tolerance = 0.05 max_adjust = 15 [force_move] enable_force_move = True [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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1968257224: New connection webhooks client 1968257224: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=3619626662 clock_est=(85.039 3602219985 50016331.192) min_half_rtt=0.000074 min_rtt_time=85.177 time_avg=85.039(0.018) clock_avg=3602219985.725(884584.400) pred_variance=1843171608.533 clock_adj=(-52.991 50014843.750) Dumping serial stats: bytes_write=801 bytes_read=4563 bytes_retransmit=0 bytes_invalid=0 send_seq=107 receive_seq=107 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 91 messages Sent 0 84.769453 84.769453 8: seq: 10, identify offset=0 count=40 Sent 1 84.770725 84.770725 8: seq: 11, identify offset=40 count=40 Sent 2 84.771933 84.771933 8: seq: 12, identify offset=80 count=40 Sent 3 84.773097 84.773097 9: seq: 13, identify offset=120 count=40 Sent 4 84.774271 84.774271 9: seq: 14, identify offset=160 count=40 Sent 5 84.776492 84.776492 9: seq: 15, identify offset=200 count=40 Sent 6 84.777456 84.777456 9: seq: 16, identify offset=240 count=40 Sent 7 84.778784 84.778784 9: seq: 17, identify offset=280 count=40 Sent 8 84.779661 84.779661 9: seq: 18, identify offset=320 count=40 Sent 9 84.781235 84.781235 9: seq: 19, identify offset=360 count=40 Sent 10 84.782206 84.782206 9: seq: 1a, identify offset=400 count=40 Sent 11 84.783627 84.783627 9: seq: 1b, identify offset=440 count=40 Sent 12 84.784743 84.784743 9: seq: 1c, identify offset=480 count=40 Sent 13 84.785684 84.785684 9: seq: 1d, identify offset=520 count=40 Sent 14 84.786556 84.786556 9: seq: 1e, identify offset=560 count=40 Sent 15 84.787339 84.787339 9: seq: 1f, identify offset=600 count=40 Sent 16 84.788274 84.788274 9: seq: 10, identify offset=640 count=40 Sent 17 84.789356 84.789356 9: seq: 11, identify offset=680 count=40 Sent 18 84.789951 84.789951 9: seq: 12, identify offset=720 count=40 Sent 19 84.790503 84.790503 9: seq: 13, identify offset=760 count=40 Sent 20 84.791076 84.791076 9: seq: 14, identify offset=800 count=40 Sent 21 84.791718 84.791718 9: seq: 15, identify offset=840 count=40 Sent 22 84.792287 84.792287 9: seq: 16, identify offset=880 count=40 Sent 23 84.792891 84.792891 9: seq: 17, identify offset=920 count=40 Sent 24 84.793442 84.793442 9: seq: 18, identify offset=960 count=40 Sent 25 84.794019 84.794019 9: seq: 19, identify offset=1000 count=40 Sent 26 84.794553 84.794553 9: seq: 1a, identify offset=1040 count=40 Sent 27 84.795249 84.795249 9: seq: 1b, identify offset=1080 count=40 Sent 28 84.795806 84.795806 9: seq: 1c, identify offset=1120 count=40 Sent 29 84.796621 84.796621 9: seq: 1d, identify offset=1160 count=40 Sent 30 84.797205 84.797205 9: seq: 1e, identify offset=1200 count=40 Sent 31 84.797790 84.797790 9: seq: 1f, identify offset=1240 count=40 Sent 32 84.798379 84.798379 9: seq: 10, identify offset=1280 count=40 Sent 33 84.799009 84.799009 9: seq: 11, identify offset=1320 count=40 Sent 34 84.799553 84.799553 9: seq: 12, identify offset=1360 count=40 Sent 35 84.800128 84.800128 9: seq: 13, identify offset=1400 count=40 Sent 36 84.800677 84.800677 9: seq: 14, identify offset=1440 count=40 Sent 37 84.801230 84.801230 9: seq: 15, identify offset=1480 count=40 Sent 38 84.801778 84.801778 9: seq: 16, identify offset=1520 count=40 Sent 39 84.802340 84.802340 9: seq: 17, identify offset=1560 count=40 Sent 40 84.802906 84.802906 9: seq: 18, identify offset=1600 count=40 Sent 41 84.803467 84.803467 9: seq: 19, identify offset=1640 count=40 Sent 42 84.804038 84.804038 9: seq: 1a, identify offset=1680 count=40 Sent 43 84.804578 84.804578 9: seq: 1b, identify offset=1720 count=40 Sent 44 84.805216 84.805216 9: seq: 1c, identify offset=1760 count=40 Sent 45 84.805894 84.805894 9: seq: 1d, identify offset=1800 count=40 Sent 46 84.806606 84.806606 9: seq: 1e, identify offset=1840 count=40 Sent 47 84.807561 84.807561 9: seq: 1f, identify offset=1880 count=40 Sent 48 84.808478 84.808478 9: seq: 10, identify offset=1920 count=40 Sent 49 84.809393 84.809393 9: seq: 11, identify offset=1960 count=40 Sent 50 84.810322 84.810322 9: seq: 12, identify offset=2000 count=40 Sent 51 84.811219 84.811219 9: seq: 13, identify offset=2040 count=40 Sent 52 84.812105 84.812105 9: seq: 14, identify offset=2080 count=40 Sent 53 84.813030 84.813030 9: seq: 15, identify offset=2120 count=40 Sent 54 84.813932 84.813932 9: seq: 16, identify offset=2160 count=40 Sent 55 84.814938 84.814938 9: seq: 17, identify offset=2200 count=40 Sent 56 84.816036 84.816036 9: seq: 18, identify offset=2240 count=40 Sent 57 84.817019 84.817019 9: seq: 19, identify offset=2280 count=40 Sent 58 84.817989 84.817989 9: seq: 1a, identify offset=2320 count=40 Sent 59 84.818902 84.818902 9: seq: 1b, identify offset=2360 count=40 Sent 60 84.819846 84.819846 9: seq: 1c, identify offset=2400 count=40 Sent 61 84.820794 84.820794 9: seq: 1d, identify offset=2440 count=40 Sent 62 84.822022 84.822022 9: seq: 1e, identify offset=2480 count=40 Sent 63 84.824558 84.824558 9: seq: 1f, identify offset=2520 count=40 Sent 64 84.826002 84.826002 9: seq: 10, identify offset=2560 count=40 Sent 65 84.827106 84.827106 9: seq: 11, identify offset=2600 count=40 Sent 66 84.828076 84.828076 9: seq: 12, identify offset=2640 count=40 Sent 67 84.829008 84.829008 9: seq: 13, identify offset=2680 count=40 Sent 68 84.829913 84.829913 9: seq: 14, identify offset=2720 count=40 Sent 69 84.830834 84.830834 9: seq: 15, identify offset=2760 count=40 Sent 70 84.831777 84.831777 9: seq: 16, identify offset=2800 count=40 Sent 71 84.832798 84.832798 9: seq: 17, identify offset=2840 count=40 Sent 72 84.833848 84.833848 9: seq: 18, identify offset=2880 count=40 Sent 73 84.834850 84.834850 9: seq: 19, identify offset=2920 count=40 Sent 74 84.835806 84.835806 9: seq: 1a, identify offset=2960 count=40 Sent 75 84.836756 84.836756 9: seq: 1b, identify offset=3000 count=40 Sent 76 84.837685 84.837685 9: seq: 1c, identify offset=3040 count=40 Sent 77 84.838597 84.838597 9: seq: 1d, identify offset=3080 count=40 Sent 78 84.839530 84.839530 9: seq: 1e, identify offset=3095 count=40 Sent 79 84.969066 84.969066 6: seq: 1f, get_uptime Sent 80 85.022196 85.022196 6: seq: 10, get_clock Sent 81 85.074263 85.074263 6: seq: 11, get_clock Sent 82 85.126435 85.126435 6: seq: 12, get_clock Sent 83 85.177440 85.177440 6: seq: 13, get_clock Sent 84 85.228453 85.228453 6: seq: 14, get_clock Sent 85 85.279449 85.279449 6: seq: 15, get_clock Sent 86 85.331266 85.331266 6: seq: 16, get_clock Sent 87 85.383180 85.383180 6: seq: 17, get_clock Sent 88 85.386752 85.386752 6: seq: 18, get_clock Sent 89 85.406381 85.406381 6: seq: 19, get_config Sent 90 85.412903 85.412903 27: seq: 1a, allocate_oids count=2, config_spi_without_cs oid=0, config_adxl345 oid=1 spi_oid=0, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000, finalize_config crc=4031677248, get_config Dumping receive queue 100 messages Receive: 0 84.767422 0.000000 13: seq: 10, stats count=51 sum=13088 sumsq=31255 Receive: 1 84.767423 0.000000 12: seq: 10, stats count=51 sum=12159 sumsq=22119 Receive: 2 84.767424 0.000000 12: seq: 10, stats count=50 sum=11729 sumsq=15801 Receive: 3 84.767425 0.000000 13: seq: 10, stats count=51 sum=13164 sumsq=23784 Receive: 4 84.767426 0.000000 13: seq: 10, stats count=51 sum=13793 sumsq=39439 Receive: 5 84.767427 0.000000 12: seq: 10, stats count=50 sum=11600 sumsq=17061 Receive: 6 84.767428 0.000000 12: seq: 10, stats count=51 sum=11047 sumsq=25352 Receive: 7 84.767429 0.000000 12: seq: 10, stats count=51 sum=11965 sumsq=20900 Receive: 8 84.767430 0.000000 12: seq: 10, stats count=51 sum=11907 sumsq=21133 Receive: 9 84.769721 84.769453 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 10 84.770940 84.770725 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 11 84.772136 84.771933 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 12 84.773316 84.773097 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 13 84.774476 84.774271 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 14 84.776675 84.776492 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 15 84.777874 84.777456 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 16 84.778970 84.778784 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 17 84.779861 84.779661 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 18 84.781409 84.781235 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 19 84.782395 84.782206 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 20 84.783833 84.783627 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 21 84.784955 84.784743 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 22 84.785860 84.785684 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 23 84.786713 84.786556 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 24 84.787518 84.787339 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 25 84.788686 84.788274 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 26 84.789472 84.789356 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 27 84.790058 84.789951 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 28 84.790607 84.790503 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 29 84.791221 84.791076 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 30 84.791824 84.791718 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 31 84.792435 84.792287 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 32 84.792999 84.792891 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 33 84.793562 84.793442 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 34 84.794124 84.794019 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 35 84.794722 84.794553 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 36 84.795360 84.795249 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 37 84.795910 84.795806 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 38 84.796740 84.796621 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 39 84.797327 84.797205 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 40 84.797896 84.797790 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 41 84.798499 84.798379 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 42 84.799114 84.799009 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 43 84.799654 84.799553 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 44 84.800235 84.800128 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 45 84.800780 84.800677 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 46 84.801333 84.801230 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 47 84.801881 84.801778 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 48 84.802458 84.802340 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 49 84.803024 84.802906 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 50 84.803583 84.803467 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 51 84.804143 84.804038 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 52 84.804728 84.804578 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 53 84.805435 84.805216 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 54 84.806000 84.805894 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 55 84.806783 84.806606 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 56 84.807737 84.807561 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 57 84.808657 84.808478 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 58 84.809567 84.809393 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 59 84.810496 84.810322 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 60 84.811393 84.811219 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 61 84.812278 84.812105 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 62 84.813202 84.813030 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 63 84.814106 84.813932 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 64 84.815132 84.814938 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 65 84.816254 84.816036 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 66 84.817212 84.817019 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 67 84.818170 84.817989 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 68 84.819105 84.818902 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 69 84.820023 84.819846 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 70 84.821006 84.820794 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 71 84.822274 84.822022 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 72 84.824946 84.824558 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 73 84.826261 84.826002 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 74 84.827287 84.827106 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 75 84.828253 84.828076 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 76 84.829184 84.829008 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 77 84.830107 84.829913 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 78 84.831009 84.830834 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 79 84.831970 84.831777 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 80 84.833044 84.832798 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 81 84.834034 84.833848 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6, 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> [gcode_macro _User_Variables] variable_verbose = True variable_travel_speed = 200 variable_move_accel = 300 variable_dock_speed = 50 variable_release_speed = 75 variable_z_drop_speed = 20 variable_safe_z = 25 variable_enable_z_hop = True variable_max_bed_y = 300 variable_max_bed_x = 300 variable_z_endstop_x = 250 variable_z_endstop_y = 299 variable_docklocation_x = 43 variable_docklocation_y = 300 variable_docklocation_z = -128 variable_dockmove_x = 40 variable_dockmove_y = 0 variable_dockmove_z = 0 variable_attachmove_x = 0 variable_attachmove_y = 30 variable_attachmove_z = 0 variable_umbilical = False variable_umbilical_x = 15 variable_umbilical_y = 15 variable_park_toolhead = False variable_parkposition_x = 125 variable_parkposition_y = 125 variable_parkposition_z = 30 variable_version = 1 gcode = {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} {% if z_endstop_x != 0 or z_endstop_y != 0 %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } {% endif %} [respond] [gcode_macro _Probe_Variables] variable_probe_attached = False variable_probe_state = False variable_probe_lock = False variable_z_endstop_x = 250 variable_z_endstop_y = 300 gcode = [gcode_macro _klicky_check_variables_version] gcode = {% set version = printer["gcode_macro _User_Variables"].version|default(0) %} {% if version != 1 %} { action_raise_error("Please update your klicky variables, there are some functionality changes") } {% endif %} [gcode_macro _exit_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move = params.MOVE|default(0) %} {% set speed = params.SPEED|default(printer["gcode_macro _User_Variables"].travel_speed) %} M400 SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel} SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} RESTORE_GCODE_STATE NAME={function} MOVE={move} MOVE_SPEED={speed} [gcode_macro _entry_point] gcode = {% set function = 'pre_' ~ params.FUNCTION %} {% set move_accel = printer["gcode_macro _User_Variables"].move_accel|default(1000) %} M400 SAVE_GCODE_STATE NAME={function} SET_GCODE_OFFSET Z=0 G90 SET_VELOCITY_LIMIT ACCEL={move_accel} [gcode_macro _Homing_Variables] gcode = {% set reset = params.RESET|default(0) %} {% if reset %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } {% endif %} [gcode_macro Attach_Probe_Lock] description = Attaches Klicky Probe, can only be docked after unlocking gcode = Attach_Probe _Probe_Lock [gcode_macro Dock_Probe_Unlock] description = Docks Klicky Probe even if it was locked gcode = _Probe_Unlock Dock_Probe [gcode_macro _Probe_Unlock] description = Unlocks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False } [gcode_macro _Probe_Lock] description = Locks Klicky Probe state gcode = SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True } [gcode_macro Attach_Probe] description = Attaches Klicky Probe gcode = {% set goback = params.BACK|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _entry_point function=Attach_Probe {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% elif not probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Attaching Probe") } {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("moving to a safe Z distance") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path _entry_point function=Attach_Probe_intern G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate} {% endif %} G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead _CheckProbe action=attach _exit_point function=Attach_Probe_intern move={goback} {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked!") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already attached!") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Attach_Probe [gcode_macro Dock_Probe] description = Docks Klicky Probe gcode = {% set goback = params.back|default(0) %} {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %} {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %} {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %} {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %} {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %} {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %} {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %} {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% if dockmove_x == dockmove_y == dockmove_z == 0 %} { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") } {% endif %} {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") } {% endif %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=Dock_Probe {% if probe_attached and not probe_lock %} {% if verbose %} { action_respond_info("Docking Probe") } {% endif %} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Umbilical_Path G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate} {% endif %} G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate} {% if docklocation_z != -128 %} G0 Z{docklocation_z} F{dock_feedrate} {% endif %} {% if docklocation_z != -128 %} G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate} {% endif %} G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate} G0 X{docklocation_x|int + dockmove_x|int - attachmove_x|int} Y{docklocation_y|int + dockmove_y|int - attachmove_y|int} F{release_feedrate} {% if printer.toolhead.position.z < safe_z %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _Park_Toolhead G4 P1000 _CheckProbe action=dock {% elif probe_lock %} {% if verbose %} { action_respond_info("Probe locked") } {% endif %} _CheckProbe action=query {% else %} {% if verbose %} { action_respond_info("Probe already docked") } {% endif %} _CheckProbe action=query {% endif %} _exit_point function=Dock_Probe move={goback} [gcode_macro PROBE_CALIBRATE] rename_existing = _PROBE_CALIBRATE description = Calibrate the probes z_offset with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") } {% endif%} _CheckProbe action=query G90 Attach_Probe back=1 _PROBE_CALIBRATE {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} M118 moving the toolhead 20 mm from the bed TESTZ Z=20 M118 remove manually the probe and continue calibration [gcode_macro PROBE_ACCURACY] rename_existing = _PROBE_ACCURACY description = Probe Z-height accuracy at current XY position with klicky automount gcode = {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %} {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %} {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %} {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %} {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %} {% if not 'xyz' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X, Y and Z Axis First!") } {% endif %} _entry_point function=PROBE_ACCURACY {% if printer['gcode_move'].position.y > (max_y - probe_offset_y) or printer['gcode_move'].position.y < probe_offset_y or printer['gcode_move'].position.x > (max_x - probe_offset_x) or printer['gcode_move'].position.x < probe_offset_x %} { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") } {% endif%} _CheckProbe action=query Attach_Probe back=1 _PROBE_ACCURACY {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe back=1 _exit_point function=PROBE_ACCURACY move=1 [homing_override] axes = xyz gcode = _User_Variables {% set verbose = printer["gcode_macro _User_Variables"].verbose %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %} {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %} {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %} {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %} {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} _klicky_check_variables_version {% if attachmove_x == attachmove_y == attachmove_z == 0 %} { action_raise_error("No attachmove location!") } {% endif %} _CheckProbe action=query {% set home_x, home_y, home_z, leave_probe_attached = False, False, False, False %} {% if 'PROBE_LOCK' in params%} {% if verbose %} { action_respond_info("PROBE_LOCK = True") } {% endif %} {% set leave_probe_attached = True %} {% endif %} {% if not 'X' in params and not 'Y' in params and not 'Z' in params %} {% set home_x, home_y, home_z = True, True, True %} {% else %} {% if 'X' in params %} {% set home_x = True %} {% endif %} {% if 'Y' in params %} {% set home_y = True %} {% endif %} {% if 'Z' in params %} {% set home_z = True %} {% endif %} {% if 'X' in params and 'Y' in params and 'Z' in params %} _Homing_Variables reset=1 {% endif %} {% endif %} _entry_point function=homing_override {% if 'z' not in printer.toolhead.homed_axes %} {% if not enable_z_hop %} {% set safe_z = 0 %} {% endif %} {% endif %} {% if home_z %} {% if 'z' in printer.toolhead.homed_axes %} {% if printer.toolhead.position.z < safe_z %} {% if verbose %} { action_respond_info("Z too low, performing ZHOP") } {% endif %} G0 Z{safe_z} F{z_drop_feedrate} {% endif %} {% else %} {% if verbose %} { action_respond_info("Z not homed, forcing full G28") } {% endif %} SET_KINEMATIC_POSITION X=0 Y=0 Z=0 G0 Z{safe_z} F{z_drop_feedrate} {% set home_x, home_y, home_z = True, True, True %} {% endif %} {% endif %} {% if attachmove_y == 0 %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% set home_y = False %} {% endif %} {% if home_x %} {% if verbose %} { action_respond_info("Homing X") } {% endif %} G28 X0 {% endif %} {% if home_y %} {% if verbose %} { action_respond_info("Homing Y") } {% endif %} G28 Y0 {% endif %} {% if home_z %} {% if verbose %} { action_respond_info("Homing Z") } {% endif %} {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Attach_Probe {% if leave_probe_attached %} _Probe_Lock {% endif %} {% else %} Dock_Probe {% endif %} _Home_Z {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} Dock_Probe {% endif %} {% endif %} _CheckProbe action=query _Park_Toolhead _exit_point function=homing_override [gcode_macro _Umbilical_Path] gcode = {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %} {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %} {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% if umbilical %} _entry_point function=Umbilical_Path G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate} _exit_point function=Umbilical_Path {% endif %} [gcode_macro _Home_Z] gcode = {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %} {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %} {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Home_Z {% if not 'xy' in printer.toolhead.homed_axes %} { action_raise_error("Must Home X and Y Axis First!") } {% else %} {% if not 'z' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Resetting Z position to zero") } {% endif %} SET_KINEMATIC_POSITION Z=0 {% endif %} G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate} G28 Z0 G0 Z{safe_z} F{z_drop_feedrate} {% endif %} _exit_point function=Home_Z [gcode_macro _CheckProbe] variable_probe_state = 0 gcode = Query_Probe _SetProbeState action={ params.ACTION } [gcode_macro _SetProbeState] gcode = {% set query_probe_triggered = printer.probe.last_query %} {% set action = params.ACTION|default('') %} {% if query_probe_triggered %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False } {% else %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True } {% endif %} {% if action == 'query' %} SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered } {% endif %} {% if not query_probe_triggered and action == 'dock' %} { action_raise_error("Probe dock failed!") } {% endif %} {% if query_probe_triggered and action == 'attach' %} { action_raise_error("Probe attach failed!") } {% endif %} [gcode_macro _Park_Toolhead] gcode = {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %} {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %} {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %} {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %} {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %} {% set verbose = printer["gcode_macro _User_Variables"].verbose %} _entry_point function=Park_Toolhead {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %} {% if verbose %} { action_respond_info("Parking Toolhead") } {% endif %} G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate} {% endif %} _exit_point function=Park_Toolhead [gcode_macro QUAD_GANTRY_LEVEL] rename_existing = _QUAD_GANTRY_LEVEL description = Conform a moving, twistable gantry to the shape of a stationary bed with klicky automount gcode = {% set V = printer["gcode_macro _User_Variables"].verbose %} {% if V %} { action_respond_info("QG Level") } {% endif %} _CheckProbe action=query G90 Attach_Probe _QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} Dock_Probe [gcode_macro G32] gcode = BED_MESH_CLEAR G28 QUAD_GANTRY_LEVEL G28 G0 X150 Y150 Z30 F3600 [gcode_macro PRINT_START] gcode = G32 ; home all axes G1 Z20 F3000 ; move nozzle away from bed [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 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-2.0 F3600 ; retract filament TURN_OFF_HEATERS G90 ; absolute positioning G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear M107 ; turn off fan BED_MESH_CLEAR RESTORE_GCODE_STATE NAME=STATE_PRINT_END [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% set max_z = printer.toolhead.axis_maximum.z|float %} {% set act_z = printer.toolhead.position.z|float %} {% if act_z < (max_z - 2.0) %} {% set z_safe = 2.0 %} {% else %} {% set z_safe = max_z - act_z %} {% endif %} PAUSE_BASE G91 {% if printer.extruder.can_extrude|lower == 'true' %} G1 E-{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} {% if "xyz" in printer.toolhead.homed_axes %} G1 Z{z_safe} F900 G90 G1 X{x_park} Y{y_park} F6000 {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro RESUME] description = Resume the actual running print rename_existing = RESUME_BASE gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% if printer.extruder.can_extrude|lower == 'true' %} G91 G1 E{E} F2100 {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} RESUME_BASE {get_params} [mcu rpi] serial = /tmp/klipper_host_mcu [adxl345] cs_pin = rpi:None [resonance_tester] accel_chip = adxl345 probe_points = 100,100,20 ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect webhooks client 1950753016: New connection webhooks client 1950753016: Client info {'program': 'Moonraker', 'version': 'v0.7.1-868-g0de712e8'} Loaded MCU 'mcu' 94 commands (v0.10.0-246-g9c417278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=180000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f446xx mcu 'rpi': Starting connect Loaded MCU 'rpi' 111 commands (v0.11.0-101-g17f7c039 / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1) MCU 'rpi' config: PCA9685_MAX=4096 ADC_MAX=4095 PWM_MAX=32768 CLOCK_FREQ=50000000 MCU=linux STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Sending MCU 'rpi' printer configuration... MCU 'rpi' shutdown: Unable to open spi device clocksync state: mcu_freq=50000000 last_clock=158038980 clock_est=(680.818 140659012 49992602.306) min_half_rtt=0.000072 min_rtt_time=680.852 time_avg=680.818(0.018) clock_avg=140659012.539(882187.929) pred_variance=1844291610.194 clock_adj=(-0.648 49992349.000) Dumping serial stats: bytes_write=809 bytes_read=4396 bytes_retransmit=0 bytes_invalid=0 send_seq=110 receive_seq=110 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 stalled_bytes=0 Dumping send queue 94 messages Sent 0 680.543998 680.543998 8: seq: 10, identify offset=0 count=40 Sent 1 680.545094 680.545094 8: seq: 11, identify offset=40 count=40 Sent 2 680.545850 680.545850 8: seq: 12, identify offset=80 count=40 Sent 3 680.546511 680.546511 9: seq: 13, identify offset=120 count=40 Sent 4 680.547275 680.547275 9: seq: 14, identify offset=160 count=40 Sent 5 680.548329 680.548329 9: seq: 15, identify offset=200 count=40 Sent 6 680.549384 680.549384 9: seq: 16, identify offset=240 count=40 Sent 7 680.550524 680.550524 9: seq: 17, identify offset=280 count=40 Sent 8 680.551908 680.551908 9: seq: 18, identify offset=320 count=40 Sent 9 680.553200 680.553200 9: seq: 19, identify offset=360 count=40 Sent 10 680.556231 680.556231 9: seq: 1a, identify offset=400 count=40 Sent 11 680.557803 680.557803 9: seq: 1b, identify offset=440 count=40 Sent 12 680.559200 680.559200 9: seq: 1c, identify offset=480 count=40 Sent 13 680.560338 680.560338 9: seq: 1d, identify offset=520 count=40 Sent 14 680.563335 680.563335 9: seq: 1e, identify offset=560 count=40 Sent 15 680.565079 680.565079 9: seq: 1f, identify offset=600 count=40 Sent 16 680.566610 680.566610 9: seq: 10, identify offset=640 count=40 Sent 17 680.568022 680.568022 9: seq: 11, identify offset=680 count=40 Sent 18 680.569630 680.569630 9: seq: 12, identify offset=720 count=40 Sent 19 680.570975 680.570975 9: seq: 13, identify offset=760 count=40 Sent 20 680.572351 680.572351 9: seq: 14, identify offset=800 count=40 Sent 21 680.573757 680.573757 9: seq: 15, identify offset=840 count=40 Sent 22 680.575644 680.575644 9: seq: 16, identify offset=880 count=40 Sent 23 680.577091 680.577091 9: seq: 17, identify offset=920 count=40 Sent 24 680.578395 680.578395 9: seq: 18, identify offset=960 count=40 Sent 25 680.581041 680.581041 9: seq: 19, identify offset=1000 count=40 Sent 26 680.582420 680.582420 9: seq: 1a, identify offset=1040 count=40 Sent 27 680.583637 680.583637 9: seq: 1b, identify offset=1080 count=40 Sent 28 680.585296 680.585296 9: seq: 1c, identify offset=1120 count=40 Sent 29 680.586709 680.586709 9: seq: 1d, identify offset=1160 count=40 Sent 30 680.588144 680.588144 9: seq: 1e, identify offset=1200 count=40 Sent 31 680.589652 680.589652 9: seq: 1f, identify offset=1240 count=40 Sent 32 680.591332 680.591332 9: seq: 10, identify offset=1280 count=40 Sent 33 680.593108 680.593108 9: seq: 11, identify offset=1320 count=40 Sent 34 680.595328 680.595328 9: seq: 12, identify offset=1360 count=40 Sent 35 680.598386 680.598386 9: seq: 13, identify offset=1400 count=40 Sent 36 680.600229 680.600229 9: seq: 14, identify offset=1440 count=40 Sent 37 680.601714 680.601714 9: seq: 15, identify offset=1480 count=40 Sent 38 680.603612 680.603612 9: seq: 16, identify offset=1520 count=40 Sent 39 680.605710 680.605710 9: seq: 17, identify offset=1560 count=40 Sent 40 680.607186 680.607186 9: seq: 18, identify offset=1600 count=40 Sent 41 680.610204 680.610204 9: seq: 19, identify offset=1640 count=40 Sent 42 680.611789 680.611789 9: seq: 1a, identify offset=1680 count=40 Sent 43 680.613291 680.613291 9: seq: 1b, identify offset=1720 count=40 Sent 44 680.615202 680.615202 9: seq: 1c, identify offset=1760 count=40 Sent 45 680.616774 680.616774 9: seq: 1d, identify offset=1800 count=40 Sent 46 680.618120 680.618120 9: seq: 1e, identify offset=1840 count=40 Sent 47 680.619648 680.619648 9: seq: 1f, identify offset=1880 count=40 Sent 48 680.621215 680.621215 9: seq: 10, identify offset=1920 count=40 Sent 49 680.622794 680.622794 9: seq: 11, identify offset=1960 count=40 Sent 50 680.624021 680.624021 9: seq: 12, identify offset=2000 count=40 Sent 51 680.625473 680.625473 9: seq: 13, identify offset=2040 count=40 Sent 52 680.627571 680.627571 9: seq: 14, identify offset=2080 count=40 Sent 53 680.628768 680.628768 9: seq: 15, identify offset=2120 count=40 Sent 54 680.629909 680.629909 9: seq: 16, identify offset=2160 count=40 Sent 55 680.630981 680.630981 9: seq: 17, identify offset=2200 count=40 Sent 56 680.632028 680.632028 9: seq: 18, identify offset=2240 count=40 Sent 57 680.633097 680.633097 9: seq: 19, identify offset=2280 count=40 Sent 58 680.634167 680.634167 9: seq: 1a, identify offset=2320 count=40 Sent 59 680.635270 680.635270 9: seq: 1b, identify offset=2360 count=40 Sent 60 680.636340 680.636340 9: seq: 1c, identify offset=2400 count=40 Sent 61 680.637389 680.637389 9: seq: 1d, identify offset=2440 count=40 Sent 62 680.638429 680.638429 9: seq: 1e, identify offset=2480 count=40 Sent 63 680.639476 680.639476 9: seq: 1f, identify offset=2520 count=40 Sent 64 680.640531 680.640531 9: seq: 10, identify offset=2560 count=40 Sent 65 680.641590 680.641590 9: seq: 11, identify offset=2600 count=40 Sent 66 680.642646 680.642646 9: seq: 12, identify offset=2640 count=40 Sent 67 680.643684 680.643684 9: seq: 13, identify offset=2680 count=40 Sent 68 680.644792 680.644792 9: seq: 14, identify offset=2720 count=40 Sent 69 680.645870 680.645870 9: seq: 15, identify offset=2760 count=40 Sent 70 680.647072 680.647072 9: seq: 16, identify offset=2800 count=40 Sent 71 680.647666 680.647666 9: seq: 17, identify offset=2840 count=40 Sent 72 680.648227 680.648227 9: seq: 18, identify offset=2880 count=40 Sent 73 680.648784 680.648784 9: seq: 19, identify offset=2920 count=40 Sent 74 680.649329 680.649329 9: seq: 1a, identify offset=2960 count=40 Sent 75 680.649897 680.649897 9: seq: 1b, identify offset=3000 count=40 Sent 76 680.650443 680.650443 9: seq: 1c, identify offset=3040 count=40 Sent 77 680.651008 680.651008 9: seq: 1d, identify offset=3080 count=40 Sent 78 680.651546 680.651546 9: seq: 1e, identify offset=3095 count=40 Sent 79 680.748092 680.748092 6: seq: 1f, get_uptime Sent 80 680.801032 680.801032 6: seq: 10, get_clock Sent 81 680.851966 680.851966 6: seq: 11, get_clock Sent 82 680.903936 680.903936 6: seq: 12, get_clock Sent 83 680.955090 680.955090 6: seq: 13, get_clock Sent 84 681.006342 681.006342 6: seq: 14, get_clock Sent 85 681.058289 681.058289 6: seq: 15, get_clock Sent 86 681.110365 681.110365 6: seq: 16, get_clock Sent 87 681.162469 681.162469 6: seq: 17, get_clock Sent 88 681.165290 681.165290 6: seq: 18, get_clock Sent 89 681.187222 681.187222 6: seq: 19, get_config Sent 90 681.188939 681.188939 7: seq: 1a, allocate_oids count=2 Sent 91 681.189258 681.189258 7: seq: 1b, config_spi_without_cs oid=0 Sent 92 681.189490 681.189490 8: seq: 1c, config_adxl345 oid=1 spi_oid=0 Sent 93 681.189758 681.189758 13: seq: 1d, spi_set_bus oid=0 spi_bus=spidev0.0 mode=3 rate=5000000 Dumping receive queue 92 messages Receive: 0 680.542959 0.000000 6: seq: 10, starting Receive: 1 680.544183 680.543998 48: seq: 11, identify_response offset=0 data="x\xda\xa5\x1ako\x1c\xb7\xf1\xaf\xb0\x07\x18NZI\xb9}\xde\x9d\x00\x7f\x90\x15'0R\xd5\x8ee\xa3\x05\x8a`\xb1\xda\xe5\xdd\x11\xda" Receive: 2 680.545241 680.545094 48: seq: 12, identify_response offset=40 data='W\x96\xbbz4\xd0\x7f\xef\x0c\x87\xaf\xdd;\xc9n\xa3/\xb7\xe4\xcc\x90\xc3\xe1\xbc\xa9?\x167\xa3\xa8\xca\xec\x8e\xf7R\xb4\x8d\\\x9c/' Receive: 3 680.546041 680.545850 48: seq: 13, identify_response offset=80 data="vEq\xce\xbe\xfb\x94\xcb\xeeF\xe4\r[\x9fEg\xcb\xd3\xf4o}'\x82\xefi\xc4nD3\x0e\xa2\x92\x80\xf7\xf3?\xbe\xb0\xb7z" Receive: 4 680.546629 680.546511 49: seq: 14, identify_response offset=120 data='\xc8\xb6m\xcf\x0c\xe1\xf7,<\x8b\x82\xb3`q\xb2(\xda\xba\xce\x9b\x12\x16\xffc\x91WU[\xe4\x03\xcfZQJV\xb4c3\xbcy' Receive: 5 680.547492 680.547275 49: seq: 15, identify_response offset=160 data="U,\xce\xd7'\xc0\xc90\x00\x0bY^\xdc2\x80\xc2\xb4\x07Oc\x0f\xa1,\rB\xd7J\xf5#\x9a7\xafF\xd6\x8dU\x95\x8d\x1d\x11" Receive: 6 680.548550 680.548329 49: seq: 16, identify_response offset=200 data='\xa4\x8e\xe0\xf7\x91\xf7\x8fvM`\xe0\x16\xb1{.\x87l\x10\xc5\xad\xa4\xd1\xd0\xe7\x8d\xac\xc5\x90\x99]\x99h@.z\xff\x04\xceQ\xf1' Receive: 7 680.549677 680.549384 49: seq: 17, identify_response offset=240 data='\xbc\xcf\xe4~\x1c\xca\xf6\xbeY\x9c\x87x\xb4f+v\xc0\xd1C\x15\xc5\x89\xd9Bv"\xa3\xcf\xc5y\x128\xac&\xaf\xda]&\x1a\xcb' Receive: 8 680.550914 680.550524 49: seq: 18, identify_response offset=280 data="\xbdb{q\x1e\xb9\x954\xcb\x06\x83\x86\x99'\x87\x95EU\x93\xbc\x9f.6\x91\xc1*\xb6\xc8\xa5\xd8\x89!\xaf\xb2v\x1cf\x04wy" Receive: 9 680.552196 680.551908 49: seq: 19, identify_response offset=320 data='5r\x1c\x97|\x9b\x8f\xd5\x90\xd9\x89:\x7f\xc8\xca\xb1\xcf\x07\xd0\x0c\xc5g\xe06/e\xb0\xbe\t\x97\xf6\xc4\xbc\x17y\xf5\xe6\xd5_\xa5' Receive: 10 680.553495 680.553200 49: seq: 1a, identify_response offset=360 data='\xa2\xe2}\xdf\xf6\x1e\xd7\xeb\xa5%\xe4\xa0\x08C\xdbM\x98(&\\\x87\xa9E\xde\x97q\xbcZ\xdb]z\x99i\xa6\xb9\xf9(c\xfb\x95' Receive: 11 680.556539 680.556231 49: seq: 1b, identify_response offset=400 data='\xd8\xaf\xd4~\xad\xec\x17\xaf\xf2G{\xdb \xc7\xc8n"\xc2\xc2l\x00\x9fp\x03\xa4\x0f\xa0\xa4\xf8\x0b\xca\x06\x8aBD\xb1\x93g\xdd\x8d' Receive: 12 680.558127 680.557803 49: seq: 1c, identify_response offset=440 data='\x9b0Y\xfa\x84\xf6\xc6\x9d\x94\x1a\xdev\xe2\x81W3\x91\x97\xf9\x90gR\xfc\x076\xd8\x8f`MC\x86B\xf3TQr\x98\x12\x8d\xc7' Receive: 13 680.559467 680.559200 49: seq: 1d, identify_response offset=480 data='\xef\xca\xa9HW\xe4\x9bt\x9d8\x15Q&\x80|*\xf5\xde\xe7M\xc3+\xf5\xf9\x08\x1a\xeb\x96\xd5\xf7\xba\x1f\xe77\r3\x07W\xbdZ' Receive: 14 680.560888 680.560338 49: seq: 1e, identify_response offset=520 data='\xbb\xfd\xee\xeb#j\xf3g\x16\x8f\x9d\x84\xd4Ya\xbb\xc4\xce\x80\xf1\xcc\xb7B\x9f0\x88;\x9e\xed\xc5n\xafd\x1c\xad}|\xb0\xac]' Receive: 15 680.563636 680.563335 49: seq: 1f, identify_response offset=560 data="\xc5\x0f\xad\x8fYX6F\xacAY-w\xa8\xd9\xb0k4\xa1\xbd\x17\xc3\x1e\x04\x93\x15\xc6\\\x01\xc3" Receive: 16 680.565438 680.565079 49: seq: 10, identify_response offset=600 data='\x9dL\x0e\xab\x8d3\x90\xc2\xaa\xae,\xaa[\xfb-J\xfb\xf9\xd8\x14\xd9TKYQ\x97\xd9\x81\xe2.\xbd\x1dx\xd79\x07\x80\xc3L\xdb' Receive: 17 680.566901 680.566610 49: seq: 11, identify_response offset=640 data='S)z\xf3INL!;\xac\xb1\x92\xdc[4t\x07\x1b\xf6\xbc\xaf[0\xdd\xee\xa8D}\xb0\x13j\xec\x98\x1a\xeab\xcc{\xab-' Receive: 18 680.568375 680.568022 49: seq: 12, identify_response offset=680 data="\xfdCv\xe0\x98\xd8`'Q\xf7\x07Qs:\xda\xc6\xad\xd2\xa3<\x9cXa\xfd\x92\xdf\x8c`Qm\xb78\xdf\x98\x11\xac\xb2S\xd6D" Receive: 19 680.569909 680.569630 49: seq: 13, identify_response offset=720 data='\xf7\x13X\xb4\x9e\xe7\x10#\xfa\x92\xf7\xce6\xd0\x81\x85\x06\xe1\xbe\x17\x03?\xc0@5&D\xf0\xda\xbc\xe6\xfd\x8e7\xc5c\x86\x0e\x0b\x98' Receive: 20 680.571247 680.570975 49: seq: 14, identify_response offset=760 data='\x80)r^\xd9\xbe\xad\xf9A<\x91y\xdd\xf9&\xa1\xc76\x9aL\xe3\r\xb0\xee<-\x1d\xd7\xca\xb8\x17\xbb\x1d\xef\xf1\x10\x12-\x06}' Receive: 21 680.572634 680.572351 49: seq: 15, identify_response offset=800 data='b\xe26W\xd1\x0cx\xca\x07n\x05\x14\x82Vo\x05\xc4\x17p*\x19\xc9\x90\x15}Ab=Y\xec\xc0\x9f(>A\xff\xf5H\xe1\x80' Receive: 22 680.574035 680.573757 49: seq: 16, identify_response offset=840 data='\xe1\xd1p\xec\xf0\x16\xe0"O\x16\xda\xe7f\x12\xf6\xcb@\x03m,\xc2o\x92s\x1a\xce\xd0\xf0\n\x0c\x9a\xbb\x8e\x14\x84\x88\x8e\xb1nK' Receive: 23 680.575982 680.575644 49: seq: 17, identify_response offset=880 data='\xb1}\xcc\xe0\xae\xedZ=W&\xc5tH\x05\x0e\x10Jd\xb1&\xa3;\x9c\xe2\xe3\\Vq\xedFBB\xd4w9\xdf>\x86\x0b\x13' Receive: 24 680.577354 680.577091 49: seq: 18, identify_response offset=920 data='%o\x06\xd8\x9c\xb5\xdb-\xec\xa2\x8c\xcaF%\xd8\xc78hu\x0c+\xcd\xd5\xd2\x83\x8c]\xe9$M\t\xc7~\xf4\xb6Y\xc12t%' Receive: 25 680.579682 680.578395 49: seq: 19, identify_response offset=960 data='\xb3,\xe0x\xa2\x017\xb0\x9c\x11\xa8\xbb\x1c\x9d\x13\x897\x16a\x9e1\xfc\x9f\xcaV;e\xd3\xfe\xd8\x8d \xeb\xd9\x01\xe1\x9e\x17\xb7^' Receive: 26 680.581339 680.581041 49: seq: 1a, identify_response offset=1000 data='\xc4\x8e\xec\xa9fi\x86\xe5\xa0k\xc1\x9e\xe7\xfb{\x01+2\x0b\xccR\x85g\xf2/\x8fE\xe1s(`)+\x8fY\xd4}V\xc2\xe9' Receive: 27 680.582674 680.582420 49: seq: 1b, identify_response offset=1040 data="\x8c`.\xe1$1\x08\x07\xd1\xe3\x19\xf6\xd0< X\x88-\x89'\xb1\xa7;\xe6/\xbf~\xc4\xc9%\xd0\x00\xfc4\x98o\xe9\xdf\x01\x9d" Receive: 28 680.583878 680.583637 49: seq: 1c, identify_response offset=1080 data='{\xe4\xc7\xb27\xbbG\xeb\xa7\tAbHt\x96p\x94\xc4^>\xc8ve\t\xa6a\xfe\x18r\x9c\x1ad\x8c"6\xf7A\xf5 \xc7' Receive: 29 680.585565 680.585296 49: seq: 1d, identify_response offset=1120 data='i\x8ck\xaf\xf2&\xf8\x85\xdb\x0b\xc1J)\xa3Q\xa1G\xad;\xdf\x04\xb0\xc0(\x10\xc7?\xe9,A\x85\xd3E\x07H\x8am\x95\x8b\xd8' Receive: 30 680.586989 680.586709 49: seq: 1e, identify_response offset=1160 data="5'\x89\t\x10\xa5D\xd4\xf0\x07\xcd\x02\x04G\xeb-DO\xfe3 $_j\xff{b\x05\xe2\xd4\x9b\x19a~%Y\x02\x91\xc2\x85" Receive: 31 680.588448 680.588144 49: seq: 1f, identify_response offset=1200 data='yY\n\x96 [gl\xce\xcb$!\xe1y~\xca\x83F\xb1\x81\x0e\x98\xbf\xfaq[\xa7\xb3\xe0\x83\xb9\x97\xd6\x02I\xeaHd\xbb\x1d' Receive: 32 680.589968 680.589652 49: seq: 10, identify_response offset=1240 data='\xee\xf3\x9e\xfb\xb4\xb5\x90\xad\x89\xd2u+\xc5\xb1\xf4\xe5`\xd1xM\x8b>\x7f\x8e\x08\xcf\xab2\xa3\x97\x02L\xb2\x99b\x1d\x8f/\t\xee' Receive: 33 680.591642 680.591332 49: seq: 11, identify_response offset=1280 data='F9P\x86A\x0c|\xb3\xc0\x1c\xd3\x9ay\xb0q\x08*t\xa2\xadPpe6\xd6z\x91\x17(`I\x9d\xc1LD\xadB\x8c\x8d@' Receive: 34 680.593471 680.593108 49: seq: 12, identify_response offset=1320 data='T\x89!*Q\xa3\x0c\xd1A\x1c1\x1fP-\x0fo\xf03#\xde\xb5\xbd\x0e\xcb\xe4+\xd4\xd8*\t\x7f\xe8\x04\\\x89\x9f\x04l\xecJ' Receive: 35 680.596171 680.595328 49: seq: 13, identify_response offset=1360 data="\xb3S\xf8H`\xd0\x14\xb2\x8ey\r\xcf\x96\xe2'\x93ma]~\xf1\xe3evu\xf1/L\xe56pE\x97\x7f\xffp\xf9K\xf6\xd3" Receive: 36 680.598890 680.598386 49: seq: 14, identify_response offset=1400 data='\xa7w\xbfb\xbc\xa2\xbf\x93\xc5\xd5\xe5\x97\xc5\xf9\xa2\x82r\xff\x01\xca\xfa\x8f\x97\x17\xcaV\x0c\x19(\xd4\xc7\x7f^\xd10\nW(\x9f\xeb' Receive: 37 680.600508 680.600229 49: seq: 15, identify_response offset=1440 data='\xcf\x17\x9f\xaf\xb3\xeb/W\xd7\xbffo/\xae\xdfa"\x93>a*3Br\xa5\n\x02\xd5\x15\xd0u\x97\xfe<[.\xce\xff\xbd<' Receive: 38 680.602008 680.601714 49: seq: 16, identify_response offset=1480 data='Y\xfd\x06\x98\xa0i\xaam\xa0\x02!\xce\xab\x8d\xd6\xbfA\xda\xd2\x89\x96\x10\xc3\xb5\x19\x17{\xd1-\x7fx\x0e\x12X\x08\xcc\xcf`\xa1\x85' Receive: 39 680.603917 680.603612 49: seq: 17, identify_response offset=1520 data='%`\xc3SXda\xeb4\x9e\xc1b\x0b\x0b\x02\xb0\xd1)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r\xac.\x839?k\x07\x8c' Receive: 40 680.606012 680.605710 49: seq: 18, identify_response offset=1560 data='\x96\x86!\xf08tz\xf8@P\x9a$`\xe2A\xea@\x81\x07\x02V}P\xe8\x81\xe0\xde|P\xe4\x81\xd6\xf1\x04\x14;P\n\xea\xe1' Receive: 41 680.607480 680.607186 49: seq: 19, identify_response offset=1600 data='\x83\x12\x0f\x14L\xd9H=P4ec\xe5\x81b\xc5\xc6\xd3\xc4;B\xb9\xa1\x94!\x88\xa2hq\x0e\n\x99\xcbd\x19\xafJ\x95\xca\r' Receive: 42 680.610500 680.610204 49: seq: 1a, identify_response offset=1640 data='\x15O\x96Ax\x03:\xa6\xa9\xb4F\xc1g\xc9\xef\x96Z\xab\xd4~4\x15\xa8)\xd0H\x7f2T\x93I\x10\xfa\x93\x91\x9a\\\x19\xd1\xd0' Receive: 43 680.612130 680.611789 49: seq: 1b, identify_response offset=1680 data='d\xac&\x83e\x18\xfb\xb3\t\xcd\x86\xeb\xc9V)\xcd\xda+\xa1\xd9\x15\xcd\x82\x9f3g\x854E\xa0\x9f\xe8\xa1\xb0\xc9D\xa9-\x93)' Receive: 44 680.613606 680.613291 49: seq: 1c, identify_response offset=1720 data='\x0b\xdeR\xaaF\r\x92\x8b\xaab\xda\x00Md\x92\xac\x1e\xe5\xc0\xf6\xf9\x1d\xc72\rS2\xeeG\x1eJ,/*\xf4`\x8f\xccT\x0b' Receive: 45 680.615498 680.615202 49: seq: 1d, identify_response offset=1760 data='%\x85\xd5\xcb\xbcaM;0pe\x0c\xc3\x01\x83\x9b b\xa6\x88\xd9\xfd^\xc07y\x16\xc9:\xf0\x8d\xc0"\xc5m\xa0}=`\x9c' Receive: 46 680.617105 680.616774 49: seq: 1e, identify_response offset=1800 data='\x84zv\x07\xab\xc2\xee\xf9\xc0\x84d\xb9\xde\x8b\xaaw\xaab4\xb2DT\xf4JTk\xd1\xacJ\x13T\xaa\x05\xdb\xf1\x86\x99\x02\xd7\xd2' Receive: 47 680.618396 680.618120 49: seq: 1f, identify_response offset=1840 data='C\x10\xbc\xa4f"\xeb\xf2^\x02Hu\x9aT\x19c\x00=\x87\x14E\x0e\xaa\xa5x\xd9\x8eUI\xe7R\xae\xf7\xc7\xeb`\xfd\x16RQ' Receive: 48 680.619954 680.619648 49: seq: 10, identify_response offset=1880 data='d\x0b\x88\x87=~Ps\xe5\x9bP\xd9w\xe01K\xc8x\xc4\xf0=\xa5\xb8\xdfHV\x8f\x03\x7f\xb0t\x10\xad\r\xde\xf4f\xb1\x026' Receive: 49 680.621467 680.621215 49: seq: 11, identify_response offset=1920 data='\x10\x08?\xb2\xed!C)\xb5h:\xda\x9aQ\xa5\x86\xee\xf5\x1d\x1e\x9eA\xe8\x1b\xb0\x0e\xae[`\xa3m\x84\x0e>\x1a\x0f\xcb\x13\xc2\x83' Receive: 50 680.623034 680.622794 49: seq: 12, identify_response offset=1960 data='\xc0Hn\x94\xd1\xa9\x13\xbb\x02\x8eq\x85\xe9\xd6T\x07\xfd\xd4\xf6\x05\xb7\xbd\x10\xa6{\xb9T|\xfd\xfc\xf1\xfd\x07\x86\x86\xcb@\x99\x05\xa0' Receive: 51 680.624264 680.624021 49: seq: 13, identify_response offset=2000 data='\xa1\x1c\xb6\x90\x02\x96\xd4\xa8|O)\xad\xb7.v\t\x99(O0Q\xd4rkA\x97T\xe7XsA\xcd\xa0\x17H\x95\x96#%\xdc' Receive: 52 680.625851 680.625473 49: seq: 14, identify_response offset=2040 data='\xc5\x90\x83@^\xff\xf0\x9a2/Cd\x9a\xa8\xae\xa7K\x89)\xa5\x1f\x06\xcb\x1ee2\x07h\xa8[`;\x90\xd5Rg\xc4\x00\xeb\x16' Receive: 53 680.627818 680.627571 49: seq: 15, identify_response offset=2080 data=',K\xab\x17\xc3\xf6\x1dFQ\x07\xb6\xcd>\xdb\xde\xa3\xc6\xc8\x01\\W\x94v\x7f\xcc\xf3\r\x12X\x04#?\x87\xbd\n3kZ~\xda' Receive: 54 680.628992 680.628768 49: seq: 16, identify_response offset=2120 data='\xd2\x19HKEr*r\xe7X\x06\xe4\x9d\x0b\x9bj&\xd8\x87\xab\xc9\xbc.\x7f\xd45\xd2\xce\x91w\xa8Iy\xe3\xe1`.r\x95?' Receive: 55 680.630137 680.629909 49: seq: 17, identify_response offset=2160 data='\xa0\xee\xae\x8d\xbc\xa9\xfdu\xc5\xa5\xccw\x9c\xf1\xa6\x80\xf4\xd0\x18(\xdc\xce\x95\x90\x92\xc3\x96Pj\x96c\x85\xfa\x06\xc4\x98\x953\x9d\xa8' Receive: 56 680.631198 680.630981 49: seq: 18, identify_response offset=2200 data='(c\xe0w\x1c/\n\x13\xf2\xe7\t\xf6y_*\x0f\xa5\xb1\xb1\x81\xfe<\xb6\x91\x8bF\xc6*\xe6\n\xafR\x952\x0c\xbe\xfam\xd5\xde' Receive: 57 680.632270 680.632028 49: seq: 19, identify_response offset=2240 data='S\xf1\xf4\x89\xeb\x05`)4\xa0^Y\x1cx\xd3.G\x9f\x82\xbd\x89k\x8bp\xc07\xbb\x17\xe0\x97\xf9C\xc1\x01\xea\xb7=)\x17u' Receive: 58 680.633336 680.633097 49: seq: 1a, identify_response offset=2280 data='\x94\x13\x96^\xa0\xc2\x8e\xb3GeN\xfc\x02\x05\x16\xee\xd7|\xd0w\xa2\xd8F\x0cQ\x8f\xb5\x993\xb6\x00r\xb8\xb6v\x8d\x8d\x18XL' Receive: 59 680.634381 680.634167 49: seq: 1b, identify_response offset=2320 data='\xf9]\xe5\xce\xfcg\x8ek\xed\x88\x87\xb6e\xdb\\\xc9\x84\xe4\x81}\xa7\xcf\xbe\x8ah\xbf\xa7Z\xc0\x94\xfb~VRDJpK\x92\xab' Receive: 60 680.635501 680.635270 49: seq: 1c, identify_response offset=2360 data='>\xdag\x18\x81\xee?b\xdf\\\xfb\x0eI\xd5\x83\x85\xa0\xc6Z\x08\xb6\xd4\xbf4\xf9\rF\xa3V+\xb2\x92\x06aPW\xd4!\x80&' Receive: 61 680.636564 680.636340 49: seq: 1d, identify_response offset=2400 data='\xc0\xc5\xe2\n\x900\r\x15UO\x0e\xac<\xce\xdcw\xd1\x8b\xd1\x0c)/\x0b\x0b\xc6\x9ad\x0e\xd6\xb1\xc0Fb\x83\x1b\xaf\x0ep\xddI' Receive: 62 680.637605 680.637389 49: seq: 1e, identify_response offset=2440 data='\xe9\xf1a\x0e\xf69\x02\xed\xe5\xf4\xe45\xc3BE;@K\x0e\xd0\x9c\xec\xa8\x17\xe2\xc0*\x1aMX\t|0\x86\xdf\xeb\x8f\xefUa' Receive: 63 680.638646 680.638429 49: seq: 1f, identify_response offset=2480 data="GM\x8eC\x98\xec8&\rI<\x076msz\x83\x91G\xd9\xde\x8c\x8b\t\x93\xda\x01\x1a\xa9i\x7f\x95L\xee\x90\x9az\xb8t'" Receive: 64 680.639698 680.639476 49: seq: 10, identify_response offset=2520 data='\xe8\x15M\xc3\x0809\x03\xdc\xaezW\xcc\x8a\xfd\xd8\xdc\x82\xf2A\xaaR\xd2s\x957/\x1d\x00dB^O\x07Yt\xeaPlI' Receive: 65 680.640762 680.640531 49: seq: 11, identify_response offset=2560 data='VH\xa6*\x0e\xaf\xd3OII\xdbT\x90\xc7\xdc\xc1\x02\xc4\x84JO\xac\x89l\x0e\x1a\x9d\xe7\xec\x03\xe4CP\xe6\xdc`\x95\xb6\xc5F' Receive: 66 680.641818 680.641590 49: seq: 12, identify_response offset=2600 data='\xb7\xfc\x0b5\xb2\xd5\xcb\xa7M\x8d\xf4{hI\xddk\x89\xedJ\xf4\xf0\xe4{\n\x00#(\xb6U\xa9\n.\xca\x9a\xaa\xbc\xc7\x94\x01_' Receive: 67 680.642861 680.642646 49: seq: 13, identify_response offset=2640 data='B\x8e\xd4{h\xc2\xe4\xc1\xf1\x95BgP\xe4\xf1\xb0\xca\x85\\\xf3\xa0\x93\x8f\xc9&\x14oQ\xb0N\x12\x95]\xebA\xaa\xd2k\x1a\xa4' Receive: 68 680.643906 680.643684 49: seq: 14, identify_response offset=2680 data='\x89\xf2\x070H\xd3\x15|GOO\xaa\xbb\x03\xb9\x89\xe4\xf4\xc0\xab{\x9a~\xc9.1f6\x05\x9fuNOQ\x1aG{\xa0\xae\xfb' Receive: 69 680.645021 680.644792 49: seq: 15, identify_response offset=2720 data='\xa4\x9bl\xa6(\xa6&\x8e\xbf\xdc\xcd\xb8\xddr\xf0\\H\xb5\x15\xdb\x16\x7f+\xe1=\xe3b\x97\xe5\x14\xbd\xa2m\xa6Nz\xe7\xb4\xe4\xb1' Receive: 70 680.646253 680.645870 49: seq: 16, identify_response offset=2760 data='n\xd7&r/\xc8\x13\x8a\xdc\xeb\x942\x05\xd1\xe7AoH\xb9\x97+\xff\xd7\xf65\x13\xdc\x92n\xbb\xab\x13\xaa\xee<\xce\x195R]' Receive: 71 680.647191 680.647072 49: seq: 17, identify_response offset=2800 data='\x17\x88F>\xe3k\xf5\x9e\xa4\x1a\xb0/q\xad)\xf4G\xe6v?\xc58j\x9eD$\xf8d\xfb\xc2\xb1\xc6G\x14\xea\xcc\x1a\xd0K\x02' Receive: 72 680.647782 680.647666 49: seq: 18, identify_response offset=2840 data='\x11\xe4\xd2\xf5\xa2K\xf7\x1a1\xe1j\xdf\xd6`\xfc\x87\x8b\xf8\x8f\x1d X\xaf\xc1\x9f\x19\xe5q\xad\x0c\x1a\x1b\x15\t]\x13\xdf\xc3\xb5\xdd' Receive: 73 680.648343 680.648227 49: seq: 19, identify_response offset=2880 data='|\xd2\xa63\xc4\x05\xa6