Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Starting Klippy...
- Args: ['/home/mks/klipper/klippy/klippy.py', '/home/mks/printer_data/config/printer.cfg', '-I', '/home/mks/printer_data/comms/klippy.serial', '-l', '/home/mks/printer_data/logs/klippy.log', '-a', '/home/mks/printer_data/comms/klippy.sock']
- Git version: 'v0.11.0-209-gddf0994b'
- Branch: master
- Remote: origin
- Tracked URL: https://github.com/Klipper3d/klipper
- CPU: 4 core ?
- Python: '3.7.3 (default, Oct 31 2022, 14:04:00) \n[GCC 8.3.0]'
- Start printer at Tue May 30 20:44:09 2023 (1685504649.3 3775.1)
- ===== Config file =====
- [mcu]
- canbus_uuid = 7af18208777d
- restart_method = command
- [mcu MKS_THR]
- canbus_uuid = 9a407fe4c5dc
- restart_method = command
- canbus_interface = can0
- [virtual_sdcard]
- path = ~/printer_data/gcodes
- on_error_gcode = CANCEL_PRINT
- [pause_resume]
- [display_status]
- [gcode_macro CANCEL_PRINT]
- description = Cancel the actual running print
- rename_existing = CANCEL_PRINT_BASE
- gcode =
- {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
- {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
- {% set allow_park = False if not macro_found
- else False if client.park_at_cancel is not defined
- else True if client.park_at_cancel|lower == 'true'
- else False %}
- {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %}
- {% set park_x = "" if not macro_found
- else "" if client.park_at_cancel_x is not defined
- else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %}
- {% set park_y = "" if not macro_found
- else "" if client.park_at_cancel_y is not defined
- else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %}
- {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %}
- {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
- _CLIENT_RETRACT LENGTH={retract}
- TURN_OFF_HEATERS
- M106 S0
- SET_PAUSE_NEXT_LAYER ENABLE=0
- SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
- CANCEL_PRINT_BASE
- [gcode_macro PAUSE]
- description = Pause the actual running print
- rename_existing = PAUSE_BASE
- gcode =
- SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}"
- PAUSE_BASE
- _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
- [gcode_macro RESUME]
- description = Resume the actual running print
- rename_existing = RESUME_BASE
- variable_last_extruder_temp = 0
- gcode =
- {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
- {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
- {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
- {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %}
- M109 S{last_extruder_temp}
- _CLIENT_EXTRUDE
- RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
- [gcode_macro SET_PAUSE_NEXT_LAYER]
- description = Enable a pause if the next layer is reached
- gcode =
- {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
- {% set ENABLE = params.ENABLE | default(1) | int != 0 %}
- {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %}
- SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
- [gcode_macro SET_PAUSE_AT_LAYER]
- description = Enable/disable a pause if a given layer number is reached
- gcode =
- {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
- {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined
- else params.LAYER is defined %}
- {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %}
- {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %}
- SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
- [gcode_macro SET_PRINT_STATS_INFO]
- rename_existing = SET_PRINT_STATS_INFO_BASE
- description = Overwrite, to get pause_next_layer and pause_at_layer feature
- variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
- variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
- gcode =
- {% if pause_next_layer.enable %}
- {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)}
- {pause_next_layer.call}
- SET_PAUSE_NEXT_LAYER ENABLE=0
- {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
- {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))}
- {pause_at_layer.call}
- SET_PAUSE_AT_LAYER ENABLE=0
- {% endif %}
- SET_PRINT_STATS_INFO_BASE {rawparams}
- [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
- description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
- gcode =
- {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
- {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
- {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
- {% set use_custom = False if not macro_found
- else False if client.use_custom_pos is not defined
- else True if client.use_custom_pos|lower == 'true'
- else False %}
- {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %}
- {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %}
- {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %}
- {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %}
- {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %}
- {% set origin = printer.gcode_move.homing_origin %}
- {% set act = printer.gcode_move.gcode_position %}
- {% set max = printer.toolhead.axis_maximum %}
- {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
- {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
- else False %}
- {% set z_min = params.Z_MIN|default(0)|float %}
- {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
- {% set x_park = params.X if params.X is defined
- else custom_park_x if use_custom
- else 0.0 if round_bed
- else (max.x - 5.0) %}
- {% set y_park = params.Y if params.Y is defined
- else custom_park_y if use_custom
- else (max.y - 5.0) if round_bed and z_park < cone
- else 0.0 if round_bed
- else (max.y - 5.0) %}
- _CLIENT_RETRACT
- {% if "xyz" in printer.toolhead.homed_axes %}
- G90
- G1 Z{z_park} F{sp_hop}
- G1 X{x_park} Y{y_park} F{sp_move}
- {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
- {% else %}
- {action_respond_info("Printer not homed")}
- {% endif %}
- [gcode_macro _CLIENT_EXTRUDE]
- description = Extrudes, if the extruder is hot enough
- gcode =
- {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
- {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
- {% set use_fw_retract = False if not macro_found
- else False if client.use_fw_retract is not defined
- else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined
- else False %}
- {% set length = (params.LENGTH|float) if params.LENGTH is defined
- else 1.0 if not macro_found
- else client.unretract|default(1.0) %}
- {% set speed = params.SPEED if params.SPEED is defined
- else 35 if not macro_found
- else client.speed_unretract|default(35) %}
- {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
- {% if printer.extruder.can_extrude %}
- {% if use_fw_retract %}
- {% if length < 0 %}
- G10
- {% else %}
- G11
- {% endif %}
- {% else %}
- M83
- G1 E{length} F{(speed|float|abs) * 60}
- {% if absolute_extrude %}
- M82
- {% endif %}
- {% endif %}
- {% else %}
- {action_respond_info("Extruder not hot enough")}
- {% endif %}
- [gcode_macro _CLIENT_RETRACT]
- description = Retracts, if the extruder is hot enough
- gcode =
- {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
- {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
- {% set length = (params.LENGTH|float) if params.LENGTH is defined
- else 1.0 if not macro_found
- else client.retract|default(1.0) %}
- {% set speed = params.SPEED if params.SPEED is defined
- else 35 if not macro_found
- else client.speed_retract|default(35) %}
- _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
- [board_pins]
- aliases =
- stepper_x_step_pin = PC14,
- stepper_x_dir_pin = PC13,
- stepper_x_enable_pin = PC15,
- stepper_x_uart_pin = PE6,
- stepper_y_step_pin = PE5,
- stepper_y_dir_pin = PE4,
- stepper_y_enable_pin = PD14,
- stepper_y_uart_pin = PE3,
- stepper_z_step_pin = PE1,
- stepper_z_dir_pin = PE0,
- stepper_z_enable_pin = PE2,
- stepper_z_uart_pin = PB7,
- stepper_z1_step_pin = PD6,
- stepper_z1_dir_pin = PD5,
- stepper_z1_enable_pin = PD7,
- stepper_z1_uart_pin = PD4,
- stepper_z2_step_pin = PD2,
- stepper_z2_dir_pin = PD1,
- stepper_z2_enable_pin = PD3,
- stepper_z2_uart_pin = PD0,
- bed_heater_pin = PD12,
- bed_thermistor_pin = PC2,
- electronics_fan_pin = PA2,
- y_endstop_pin = PB15,
- z_endstop_pin = PA15,
- [heater_fan hotend_fan]
- pin = MKS_THR:gpio1
- max_power = 1.0
- kick_start_time = 0.5
- heater = extruder
- heater_temp = 50.0
- fan_speed = 1.0
- [fan_generic fan0]
- pin = MKS_THR:gpio2
- max_power = 1.0
- kick_start_time = 0.5
- off_below = 0.10
- [fan_generic fan1]
- pin = MKS_THR:gpio3
- max_power = 1.0
- kick_start_time = 0.5
- off_below = 0.10
- [stepper_x]
- endstop_pin = MKS_THR:gpio24
- position_endstop = 150
- step_pin = stepper_x_step_pin
- dir_pin = stepper_x_dir_pin
- enable_pin = !stepper_x_enable_pin
- rotation_distance = 40
- microsteps = 16
- full_steps_per_rotation = 200
- position_min = 0
- homing_speed = 75
- homing_retract_dist = 5
- homing_positive_dir = true
- position_max = 150
- [adc_temperature extruder]
- temperature1 = 27
- voltage1 = 3.156
- temperature2 = 34.8
- voltage2 = 3.10
- temperature3 = 42
- voltage3 = 3.01
- temperature4 = 81.0
- voltage4 = 2.354
- temperature5 = 140.7
- voltage5 = 1.029
- temperature6 = 171
- voltage6 = 0.619
- temperature7 = 234
- voltage7 = 0.222
- temperature8 = 300
- voltage8 = 0.098
- [extruder]
- step_pin = MKS_THR:gpio5
- dir_pin = MKS_THR:gpio4
- enable_pin = !MKS_THR:gpio10
- rotation_distance = 22.4
- gear_ratio = 50:17
- microsteps = 16
- full_steps_per_rotation = 200
- nozzle_diameter = 0.400
- filament_diameter = 1.75
- heater_pin = MKS_THR:gpio0
- sensor_pin = MKS_THR:gpio26
- sensor_type = Generic 3950
- min_temp = -270
- max_temp = 270
- max_power = 0.6
- min_extrude_temp = 170
- control = pid
- pid_kp = 26.213
- pid_ki = 1.304
- pid_kd = 131.721
- pressure_advance = 0.03
- pressure_advance_smooth_time = 0.040
- [tmc2209 extruder]
- uart_pin = MKS_THR:gpio6
- interpolate = false
- run_current = 0.5
- hold_current = 0.2
- sense_resistor = 0.110
- stealthchop_threshold = 0
- [neopixel my_neopixel]
- pin = MKS_THR:gpio20
- chain_count = 10
- color_order = GRB
- initial_red = 0.1
- initial_green = 0.1
- initial_blue = 0.1
- initial_white = 0.1
- [adxl345]
- cs_pin = MKS_THR:gpio13
- spi_software_sclk_pin = MKS_THR:gpio14
- spi_software_mosi_pin = MKS_THR:gpio15
- spi_software_miso_pin = MKS_THR:gpio12
- [probe]
- pin = ^MKS_THR:gpio21
- x_offset = 0
- y_offset = 19.75
- z_offset = 7.45
- speed = 7
- samples = 3
- samples_result = median
- sample_retract_dist = 0.5
- samples_tolerance = 0.05
- samples_tolerance_retries = 3
- [tmc2209 stepper_x]
- uart_pin = stepper_x_uart_pin
- interpolate = True
- run_current = 0.5
- hold_current = 0.15
- sense_resistor = 0.110
- stealthchop_threshold = 1
- [stepper_y]
- step_pin = stepper_y_step_pin
- dir_pin = stepper_y_dir_pin
- enable_pin = !stepper_y_enable_pin
- endstop_pin = ^y_endstop_pin
- rotation_distance = 40
- microsteps = 16
- full_steps_per_rotation = 200
- position_min = 0
- homing_speed = 75
- homing_retract_dist = 5
- homing_positive_dir = true
- position_endstop = 150
- position_max = 150
- [tmc2209 stepper_y]
- uart_pin = stepper_y_uart_pin
- interpolate = True
- run_current = 0.5
- hold_current = 0.15
- sense_resistor = 0.110
- stealthchop_threshold = 1
- [stepper_z]
- step_pin = stepper_z_step_pin
- dir_pin = stepper_z_dir_pin
- enable_pin = !stepper_z_enable_pin
- endstop_pin = z_endstop_pin
- rotation_distance = 8
- microsteps = 16
- full_steps_per_rotation = 200
- homing_speed = 8.0
- second_homing_speed = 3
- homing_retract_dist = 3
- position_endstop = -0.5
- position_max = 150
- position_min = -2.5
- [tmc2209 stepper_z]
- uart_pin = stepper_z_uart_pin
- interpolate = true
- run_current = 0.2
- hold_current = 0.15
- sense_resistor = 0.110
- stealthchop_threshold = 1
- [stepper_z1]
- step_pin = stepper_z1_step_pin
- dir_pin = stepper_z1_dir_pin
- enable_pin = !stepper_z1_enable_pin
- rotation_distance = 8
- microsteps = 16
- full_steps_per_rotation = 200
- [tmc2209 stepper_z1]
- uart_pin = stepper_z1_uart_pin
- interpolate = true
- run_current = 0.37
- hold_current = 0.15
- sense_resistor = 0.110
- stealthchop_threshold = 1
- [stepper_z2]
- step_pin = stepper_z2_step_pin
- dir_pin = stepper_z2_dir_pin
- enable_pin = !stepper_z2_enable_pin
- rotation_distance = 8
- microsteps = 16
- full_steps_per_rotation = 200
- [tmc2209 stepper_z2]
- uart_pin = stepper_z2_uart_pin
- interpolate = true
- run_current = 0.37
- hold_current = 0.15
- sense_resistor = 0.110
- stealthchop_threshold = 1
- [gcode_macro _User_Variables]
- variable_verbose = True
- variable_travel_speed = 200
- variable_dock_speed = 50
- variable_release_speed = 75
- variable_z_drop_speed = 10
- variable_safe_z = 15
- variable_enable_z_hop = True
- variable_max_bed_y = 160
- variable_max_bed_x = 160
- variable_z_endstop_x = 87
- variable_z_endstop_y = 126
- variable_docklocation_x = 16
- variable_docklocation_y = 163
- 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 = 75
- variable_parkposition_y = 75
- 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 docklocation_z == 0 %}
- SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=docklocation_z VALUE={ home_z_height }
- {% endif %}
- {% 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 %}
- [gcode_macro _Probe_Variables]
- variable_probe_attached = False
- variable_probe_state = False
- variable_probe_lock = False
- variable_z_endstop_x = 0
- variable_z_endstop_y = 0
- 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) %}
- M400
- RESTORE_GCODE_STATE NAME={function} MOVE={move}
- [gcode_macro _entry_point]
- gcode =
- {% set function = 'pre_' ~ params.FUNCTION %}
- M400
- SAVE_GCODE_STATE NAME={function}
- SET_GCODE_OFFSET Z=0
- G90
- [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 move={goback}
- [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}
- {% 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%}
- _entry_point function=PROBE_CALIBRATE
- _CheckProbe action=query
- Attach_Probe back=1
- _PROBE_CALIBRATE {% for p in params
- %}{'%s=%s ' % (p, params[p])}{%
- endfor %}
- Dock_Probe back=1
- _exit_point function=PROBE_CALIBRATE move=1
- [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
- [force_move]
- enable_force_move = True
- [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 = False, False, False %}
- {% 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 %}
- {% if printer["gcode_macro _HOME_X"] is defined %}
- _HOME_X
- {% else %}
- G28 X0
- {% endif %}
- {% endif %}
- {% if home_y %}
- {% if verbose %}
- { action_respond_info("Homing Y") }
- {% endif %}
- {% if printer["gcode_macro _HOME_Y"] is defined %}
- _HOME_Y
- {% else %}
- G28 Y0
- {% endif %}
- {% 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
- {% 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={ 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 Z_TILT_ADJUST]
- description =
- gcode =
- {% set V = printer["gcode_macro _User_Variables"].verbose %}
- {% if V %}
- { action_respond_info("Z Tilt Adjust") }
- {% endif %}
- _CheckProbe action=query
- Attach_Probe
- _Z_TILT_ADJUST {% for p in params
- %}{'%s=%s ' % (p, params[p])}{%
- endfor %}
- Dock_Probe
- G28 Z0
- [gcode_macro BED_MESH_CALIBRATE]
- description = Perform Mesh Bed Leveling with klicky automount
- gcode =
- {% set V = printer["gcode_macro _User_Variables"].verbose %}
- {% if V %}
- { action_respond_info("Bed Mesh Calibrate") }
- {% endif %}
- _CheckProbe action=query
- Attach_Probe
- _BED_MESH_CALIBRATE {% for p in params
- %}{'%s=%s ' % (p, params[p])}{%
- endfor %}
- Dock_Probe
- [temperature_sensor RPi]
- sensor_type = temperature_host
- min_temp = 10
- max_temp = 100
- [temperature_sensor mcu_temp]
- sensor_type = temperature_mcu
- min_temp = 0
- max_temp = 100
- [temperature_sensor Tool_Head]
- sensor_type = temperature_mcu
- sensor_mcu = MKS_THR
- [printer]
- kinematics = corexy
- max_z_velocity = 10
- max_z_accel = 30
- max_accel = 4000
- max_velocity = 300
- square_corner_velocity = 5.0
- [idle_timeout]
- timeout = 1800
- [heater_fan electronics]
- pin = electronics_fan_pin
- max_power = 1.0
- kick_start_time = 0.5
- heater = extruder
- heater_temp = 50.0
- fan_speed = 0.2
- off_below = 0.10
- [heater_bed]
- heater_pin = bed_heater_pin
- sensor_pin = bed_thermistor_pin
- sensor_type = Generic 3950
- max_power = 0.6
- min_temp = 0
- max_temp = 120
- control = pid
- pid_kp = 58.437
- pid_ki = 2.347
- pid_kd = 363.769
- =======================
- Extruder max_extrude_ratio=0.266081
- Config error
- Traceback (most recent call last):
- File "/home/mks/klipper/klippy/klippy.py", line 175, in _connect
- self._read_config()
- File "/home/mks/klipper/klippy/klippy.py", line 145, in _read_config
- pconfig.check_unused_options(config)
- File "/home/mks/klipper/klippy/configfile.py", line 305, in check_unused_options
- % (option, section))
- configparser.Error: Option 'restart_method' is not valid in section 'mcu'
- webhooks client 281473612662040: New connection
- webhooks client 281473612662040: Client info {'program': 'Moonraker', 'version': 'v0.8.0-45-gc41c588'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement