Advertisement
ueatinmycookies

klippy.log

May 30th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.87 KB | None | 0 0
  1. Starting Klippy...
  2. 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']
  3. Git version: 'v0.11.0-209-gddf0994b'
  4. Branch: master
  5. Remote: origin
  6. Tracked URL: https://github.com/Klipper3d/klipper
  7. CPU: 4 core ?
  8. Python: '3.7.3 (default, Oct 31 2022, 14:04:00) \n[GCC 8.3.0]'
  9. Start printer at Tue May 30 20:44:09 2023 (1685504649.3 3775.1)
  10. ===== Config file =====
  11. [mcu]
  12. canbus_uuid = 7af18208777d
  13. restart_method = command
  14.  
  15. [mcu MKS_THR]
  16. canbus_uuid = 9a407fe4c5dc
  17. restart_method = command
  18. canbus_interface = can0
  19.  
  20. [virtual_sdcard]
  21. path = ~/printer_data/gcodes
  22. on_error_gcode = CANCEL_PRINT
  23.  
  24. [pause_resume]
  25.  
  26. [display_status]
  27.  
  28. [gcode_macro CANCEL_PRINT]
  29. description = Cancel the actual running print
  30. rename_existing = CANCEL_PRINT_BASE
  31. gcode =
  32.  
  33. {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
  34. {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
  35. {% set allow_park = False if not macro_found
  36. else False if client.park_at_cancel is not defined
  37. else True if client.park_at_cancel|lower == 'true'
  38. else False %}
  39. {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %}
  40.  
  41. {% set park_x = "" if not macro_found
  42. else "" if client.park_at_cancel_x is not defined
  43. else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %}
  44. {% set park_y = "" if not macro_found
  45. else "" if client.park_at_cancel_y is not defined
  46. else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %}
  47. {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %}
  48.  
  49. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  50. _CLIENT_RETRACT LENGTH={retract}
  51. TURN_OFF_HEATERS
  52. M106 S0
  53.  
  54. SET_PAUSE_NEXT_LAYER ENABLE=0
  55. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  56. CANCEL_PRINT_BASE
  57.  
  58. [gcode_macro PAUSE]
  59. description = Pause the actual running print
  60. rename_existing = PAUSE_BASE
  61. gcode =
  62. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}"
  63.  
  64. PAUSE_BASE
  65. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  66.  
  67. [gcode_macro RESUME]
  68. description = Resume the actual running print
  69. rename_existing = RESUME_BASE
  70. variable_last_extruder_temp = 0
  71. gcode =
  72.  
  73. {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
  74. {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
  75. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  76. {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %}
  77.  
  78. M109 S{last_extruder_temp}
  79.  
  80. _CLIENT_EXTRUDE
  81. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  82.  
  83. [gcode_macro SET_PAUSE_NEXT_LAYER]
  84. description = Enable a pause if the next layer is reached
  85. gcode =
  86. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  87. {% set ENABLE = params.ENABLE | default(1) | int != 0 %}
  88. {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %}
  89. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  90.  
  91. [gcode_macro SET_PAUSE_AT_LAYER]
  92. description = Enable/disable a pause if a given layer number is reached
  93. gcode =
  94. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  95. {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined
  96. else params.LAYER is defined %}
  97. {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %}
  98. {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %}
  99. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  100.  
  101. [gcode_macro SET_PRINT_STATS_INFO]
  102. rename_existing = SET_PRINT_STATS_INFO_BASE
  103. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  104. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  105. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  106. gcode =
  107. {% if pause_next_layer.enable %}
  108. {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)}
  109. {pause_next_layer.call}
  110. SET_PAUSE_NEXT_LAYER ENABLE=0
  111. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  112. {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))}
  113. {pause_at_layer.call}
  114. SET_PAUSE_AT_LAYER ENABLE=0
  115. {% endif %}
  116. SET_PRINT_STATS_INFO_BASE {rawparams}
  117.  
  118. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  119. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  120. gcode =
  121.  
  122. {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
  123. {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
  124. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  125. {% set use_custom = False if not macro_found
  126. else False if client.use_custom_pos is not defined
  127. else True if client.use_custom_pos|lower == 'true'
  128. else False %}
  129. {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %}
  130. {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %}
  131. {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %}
  132. {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %}
  133. {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %}
  134.  
  135. {% set origin = printer.gcode_move.homing_origin %}
  136. {% set act = printer.gcode_move.gcode_position %}
  137. {% set max = printer.toolhead.axis_maximum %}
  138. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  139. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  140. else False %}
  141.  
  142. {% set z_min = params.Z_MIN|default(0)|float %}
  143. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  144. {% set x_park = params.X if params.X is defined
  145. else custom_park_x if use_custom
  146. else 0.0 if round_bed
  147. else (max.x - 5.0) %}
  148. {% set y_park = params.Y if params.Y is defined
  149. else custom_park_y if use_custom
  150. else (max.y - 5.0) if round_bed and z_park < cone
  151. else 0.0 if round_bed
  152. else (max.y - 5.0) %}
  153.  
  154. _CLIENT_RETRACT
  155. {% if "xyz" in printer.toolhead.homed_axes %}
  156. G90
  157. G1 Z{z_park} F{sp_hop}
  158. G1 X{x_park} Y{y_park} F{sp_move}
  159. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  160. {% else %}
  161. {action_respond_info("Printer not homed")}
  162. {% endif %}
  163.  
  164. [gcode_macro _CLIENT_EXTRUDE]
  165. description = Extrudes, if the extruder is hot enough
  166. gcode =
  167. {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
  168. {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
  169. {% set use_fw_retract = False if not macro_found
  170. else False if client.use_fw_retract is not defined
  171. else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined
  172. else False %}
  173.  
  174. {% set length = (params.LENGTH|float) if params.LENGTH is defined
  175. else 1.0 if not macro_found
  176. else client.unretract|default(1.0) %}
  177.  
  178. {% set speed = params.SPEED if params.SPEED is defined
  179. else 35 if not macro_found
  180. else client.speed_unretract|default(35) %}
  181.  
  182. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  183.  
  184. {% if printer.extruder.can_extrude %}
  185. {% if use_fw_retract %}
  186. {% if length < 0 %}
  187. G10
  188. {% else %}
  189. G11
  190. {% endif %}
  191. {% else %}
  192. M83
  193. G1 E{length} F{(speed|float|abs) * 60}
  194. {% if absolute_extrude %}
  195. M82
  196. {% endif %}
  197. {% endif %}
  198. {% else %}
  199. {action_respond_info("Extruder not hot enough")}
  200. {% endif %}
  201.  
  202. [gcode_macro _CLIENT_RETRACT]
  203. description = Retracts, if the extruder is hot enough
  204. gcode =
  205. {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %}
  206. {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %}
  207.  
  208. {% set length = (params.LENGTH|float) if params.LENGTH is defined
  209. else 1.0 if not macro_found
  210. else client.retract|default(1.0) %}
  211.  
  212. {% set speed = params.SPEED if params.SPEED is defined
  213. else 35 if not macro_found
  214. else client.speed_retract|default(35) %}
  215.  
  216. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  217.  
  218. [board_pins]
  219. aliases =
  220.  
  221. stepper_x_step_pin = PC14,
  222. stepper_x_dir_pin = PC13,
  223. stepper_x_enable_pin = PC15,
  224. stepper_x_uart_pin = PE6,
  225.  
  226.  
  227. stepper_y_step_pin = PE5,
  228. stepper_y_dir_pin = PE4,
  229. stepper_y_enable_pin = PD14,
  230. stepper_y_uart_pin = PE3,
  231.  
  232.  
  233. stepper_z_step_pin = PE1,
  234. stepper_z_dir_pin = PE0,
  235. stepper_z_enable_pin = PE2,
  236. stepper_z_uart_pin = PB7,
  237.  
  238.  
  239. stepper_z1_step_pin = PD6,
  240. stepper_z1_dir_pin = PD5,
  241. stepper_z1_enable_pin = PD7,
  242. stepper_z1_uart_pin = PD4,
  243.  
  244.  
  245. stepper_z2_step_pin = PD2,
  246. stepper_z2_dir_pin = PD1,
  247. stepper_z2_enable_pin = PD3,
  248. stepper_z2_uart_pin = PD0,
  249.  
  250.  
  251. bed_heater_pin = PD12,
  252. bed_thermistor_pin = PC2,
  253.  
  254.  
  255. electronics_fan_pin = PA2,
  256.  
  257.  
  258. y_endstop_pin = PB15,
  259. z_endstop_pin = PA15,
  260.  
  261. [heater_fan hotend_fan]
  262. pin = MKS_THR:gpio1
  263. max_power = 1.0
  264. kick_start_time = 0.5
  265. heater = extruder
  266. heater_temp = 50.0
  267. fan_speed = 1.0
  268.  
  269. [fan_generic fan0]
  270. pin = MKS_THR:gpio2
  271. max_power = 1.0
  272. kick_start_time = 0.5
  273. off_below = 0.10
  274.  
  275. [fan_generic fan1]
  276. pin = MKS_THR:gpio3
  277. max_power = 1.0
  278. kick_start_time = 0.5
  279. off_below = 0.10
  280.  
  281. [stepper_x]
  282. endstop_pin = MKS_THR:gpio24
  283. position_endstop = 150
  284. step_pin = stepper_x_step_pin
  285. dir_pin = stepper_x_dir_pin
  286. enable_pin = !stepper_x_enable_pin
  287. rotation_distance = 40
  288. microsteps = 16
  289. full_steps_per_rotation = 200
  290. position_min = 0
  291. homing_speed = 75
  292. homing_retract_dist = 5
  293. homing_positive_dir = true
  294. position_max = 150
  295.  
  296. [adc_temperature extruder]
  297. temperature1 = 27
  298. voltage1 = 3.156
  299. temperature2 = 34.8
  300. voltage2 = 3.10
  301. temperature3 = 42
  302. voltage3 = 3.01
  303. temperature4 = 81.0
  304. voltage4 = 2.354
  305. temperature5 = 140.7
  306. voltage5 = 1.029
  307. temperature6 = 171
  308. voltage6 = 0.619
  309. temperature7 = 234
  310. voltage7 = 0.222
  311. temperature8 = 300
  312. voltage8 = 0.098
  313.  
  314. [extruder]
  315. step_pin = MKS_THR:gpio5
  316. dir_pin = MKS_THR:gpio4
  317. enable_pin = !MKS_THR:gpio10
  318. rotation_distance = 22.4
  319. gear_ratio = 50:17
  320. microsteps = 16
  321. full_steps_per_rotation = 200
  322. nozzle_diameter = 0.400
  323. filament_diameter = 1.75
  324. heater_pin = MKS_THR:gpio0
  325. sensor_pin = MKS_THR:gpio26
  326. sensor_type = Generic 3950
  327. min_temp = -270
  328. max_temp = 270
  329. max_power = 0.6
  330. min_extrude_temp = 170
  331. control = pid
  332. pid_kp = 26.213
  333. pid_ki = 1.304
  334. pid_kd = 131.721
  335. pressure_advance = 0.03
  336. pressure_advance_smooth_time = 0.040
  337.  
  338. [tmc2209 extruder]
  339. uart_pin = MKS_THR:gpio6
  340. interpolate = false
  341. run_current = 0.5
  342. hold_current = 0.2
  343. sense_resistor = 0.110
  344. stealthchop_threshold = 0
  345.  
  346. [neopixel my_neopixel]
  347. pin = MKS_THR:gpio20
  348. chain_count = 10
  349. color_order = GRB
  350. initial_red = 0.1
  351. initial_green = 0.1
  352. initial_blue = 0.1
  353. initial_white = 0.1
  354.  
  355. [adxl345]
  356. cs_pin = MKS_THR:gpio13
  357. spi_software_sclk_pin = MKS_THR:gpio14
  358. spi_software_mosi_pin = MKS_THR:gpio15
  359. spi_software_miso_pin = MKS_THR:gpio12
  360.  
  361. [probe]
  362. pin = ^MKS_THR:gpio21
  363. x_offset = 0
  364. y_offset = 19.75
  365. z_offset = 7.45
  366. speed = 7
  367. samples = 3
  368. samples_result = median
  369. sample_retract_dist = 0.5
  370. samples_tolerance = 0.05
  371. samples_tolerance_retries = 3
  372.  
  373. [tmc2209 stepper_x]
  374. uart_pin = stepper_x_uart_pin
  375. interpolate = True
  376. run_current = 0.5
  377. hold_current = 0.15
  378. sense_resistor = 0.110
  379. stealthchop_threshold = 1
  380.  
  381. [stepper_y]
  382. step_pin = stepper_y_step_pin
  383. dir_pin = stepper_y_dir_pin
  384. enable_pin = !stepper_y_enable_pin
  385. endstop_pin = ^y_endstop_pin
  386. rotation_distance = 40
  387. microsteps = 16
  388. full_steps_per_rotation = 200
  389. position_min = 0
  390. homing_speed = 75
  391. homing_retract_dist = 5
  392. homing_positive_dir = true
  393. position_endstop = 150
  394. position_max = 150
  395.  
  396. [tmc2209 stepper_y]
  397. uart_pin = stepper_y_uart_pin
  398. interpolate = True
  399. run_current = 0.5
  400. hold_current = 0.15
  401. sense_resistor = 0.110
  402. stealthchop_threshold = 1
  403.  
  404. [stepper_z]
  405. step_pin = stepper_z_step_pin
  406. dir_pin = stepper_z_dir_pin
  407. enable_pin = !stepper_z_enable_pin
  408. endstop_pin = z_endstop_pin
  409. rotation_distance = 8
  410. microsteps = 16
  411. full_steps_per_rotation = 200
  412. homing_speed = 8.0
  413. second_homing_speed = 3
  414. homing_retract_dist = 3
  415. position_endstop = -0.5
  416. position_max = 150
  417. position_min = -2.5
  418.  
  419. [tmc2209 stepper_z]
  420. uart_pin = stepper_z_uart_pin
  421. interpolate = true
  422. run_current = 0.2
  423. hold_current = 0.15
  424. sense_resistor = 0.110
  425. stealthchop_threshold = 1
  426.  
  427. [stepper_z1]
  428. step_pin = stepper_z1_step_pin
  429. dir_pin = stepper_z1_dir_pin
  430. enable_pin = !stepper_z1_enable_pin
  431. rotation_distance = 8
  432. microsteps = 16
  433. full_steps_per_rotation = 200
  434.  
  435. [tmc2209 stepper_z1]
  436. uart_pin = stepper_z1_uart_pin
  437. interpolate = true
  438. run_current = 0.37
  439. hold_current = 0.15
  440. sense_resistor = 0.110
  441. stealthchop_threshold = 1
  442.  
  443. [stepper_z2]
  444. step_pin = stepper_z2_step_pin
  445. dir_pin = stepper_z2_dir_pin
  446. enable_pin = !stepper_z2_enable_pin
  447. rotation_distance = 8
  448. microsteps = 16
  449. full_steps_per_rotation = 200
  450.  
  451. [tmc2209 stepper_z2]
  452. uart_pin = stepper_z2_uart_pin
  453. interpolate = true
  454. run_current = 0.37
  455. hold_current = 0.15
  456. sense_resistor = 0.110
  457. stealthchop_threshold = 1
  458.  
  459. [gcode_macro _User_Variables]
  460. variable_verbose = True
  461. variable_travel_speed = 200
  462. variable_dock_speed = 50
  463. variable_release_speed = 75
  464. variable_z_drop_speed = 10
  465. variable_safe_z = 15
  466. variable_enable_z_hop = True
  467. variable_max_bed_y = 160
  468. variable_max_bed_x = 160
  469. variable_z_endstop_x = 87
  470. variable_z_endstop_y = 126
  471. variable_docklocation_x = 16
  472. variable_docklocation_y = 163
  473. variable_docklocation_z = -128
  474. variable_dockmove_x = 40
  475. variable_dockmove_y = 0
  476. variable_dockmove_z = 0
  477. variable_attachmove_x = 0
  478. variable_attachmove_y = 30
  479. variable_attachmove_z = 0
  480. variable_umbilical = False
  481. variable_umbilical_x = 15
  482. variable_umbilical_y = 15
  483. variable_park_toolhead = False
  484. variable_parkposition_x = 75
  485. variable_parkposition_y = 75
  486. variable_parkposition_z = 30
  487. variable_version = 1
  488. gcode =
  489. {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %}
  490. {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %}
  491. {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %}
  492. {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %}
  493. {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %}
  494.  
  495.  
  496. {% if docklocation_z == 0 %}
  497. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=docklocation_z VALUE={ home_z_height }
  498. {% endif %}
  499.  
  500.  
  501. {% if z_endstop_x != 0 or z_endstop_y != 0 %}
  502. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x }
  503. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y }
  504.  
  505.  
  506. {% else %}
  507. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox }
  508. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy }
  509. {% endif %}
  510.  
  511. [gcode_macro _Probe_Variables]
  512. variable_probe_attached = False
  513. variable_probe_state = False
  514. variable_probe_lock = False
  515. variable_z_endstop_x = 0
  516. variable_z_endstop_y = 0
  517. gcode =
  518.  
  519. [gcode_macro _klicky_check_variables_version]
  520. gcode =
  521. {% set version = printer["gcode_macro _User_Variables"].version|default(0) %}
  522.  
  523. {% if version != 1 %}
  524. { action_raise_error("Please update your klicky variables, there are some functionality changes") }
  525. {% endif %}
  526.  
  527. [gcode_macro _exit_point]
  528. gcode =
  529. {% set function = 'pre_' ~ params.FUNCTION %}
  530. {% set move = params.MOVE|default(0) %}
  531.  
  532. M400
  533. RESTORE_GCODE_STATE NAME={function} MOVE={move}
  534.  
  535. [gcode_macro _entry_point]
  536. gcode =
  537. {% set function = 'pre_' ~ params.FUNCTION %}
  538.  
  539. M400
  540. SAVE_GCODE_STATE NAME={function}
  541.  
  542. SET_GCODE_OFFSET Z=0
  543.  
  544. G90
  545.  
  546. [gcode_macro _Homing_Variables]
  547. gcode =
  548. {% set reset = params.RESET|default(0) %}
  549. {% if reset %}
  550. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False }
  551. {% endif %}
  552.  
  553. [gcode_macro Attach_Probe_Lock]
  554. description = Attaches Klicky Probe, can only be docked after unlocking
  555. gcode =
  556. Attach_Probe
  557. _Probe_Lock
  558.  
  559. [gcode_macro Dock_Probe_Unlock]
  560. description = Docks Klicky Probe even if it was locked
  561. gcode =
  562. _Probe_Unlock
  563. Dock_Probe
  564.  
  565. [gcode_macro _Probe_Unlock]
  566. description = Unlocks Klicky Probe state
  567. gcode =
  568. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ False }
  569.  
  570. [gcode_macro _Probe_Lock]
  571. description = Locks Klicky Probe state
  572. gcode =
  573. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_lock VALUE={ True }
  574.  
  575. [gcode_macro Attach_Probe]
  576. description = Attaches Klicky Probe
  577. gcode =
  578.  
  579. {% set goback = params.BACK|default(0) %}
  580.  
  581. {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %}
  582. {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %}
  583. {% set verbose = printer["gcode_macro _User_Variables"].verbose %}
  584.  
  585. {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %}
  586. {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %}
  587. {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %}
  588. {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %}
  589. {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %}
  590. {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %}
  591. {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %}
  592. {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %}
  593. {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %}
  594.  
  595. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %}
  596. {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %}
  597.  
  598. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %}
  599. {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %}
  600. {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %}
  601. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  602.  
  603. _entry_point function=Attach_Probe
  604.  
  605.  
  606. {% if dockmove_x == dockmove_y == dockmove_z == 0 %}
  607. { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") }
  608. {% endif %}
  609.  
  610. {% if attachmove_x == attachmove_y == attachmove_z == 0 %}
  611. { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") }
  612. {% endif %}
  613.  
  614.  
  615. {% if not 'xy' in printer.toolhead.homed_axes %}
  616. { action_raise_error("Must Home X and Y Axis First!") }
  617.  
  618.  
  619. {% elif not probe_attached and not probe_lock %}
  620. {% if verbose %}
  621. { action_respond_info("Attaching Probe") }
  622. {% endif %}
  623.  
  624. {% if not 'z' in printer.toolhead.homed_axes %}
  625. {% if verbose %}
  626. { action_respond_info("Resetting Z position to zero") }
  627. {% endif %}
  628. SET_KINEMATIC_POSITION Z=0
  629. {% if not enable_z_hop %}
  630. {% set safe_z = 0 %}
  631. {% endif %}
  632. {% endif %}
  633.  
  634.  
  635.  
  636. {% if printer.toolhead.position.z < safe_z %}
  637. {% if verbose %}
  638. { action_respond_info("moving to a safe Z distance") }
  639. {% endif %}
  640. G0 Z{safe_z} F{z_drop_feedrate}
  641. {% endif %}
  642.  
  643. {% if not 'z' in printer.toolhead.homed_axes %}
  644. {% if verbose %}
  645. { action_respond_info("Resetting Z position to zero") }
  646. {% endif %}
  647. SET_KINEMATIC_POSITION Z=0
  648. {% endif %}
  649.  
  650. {% if printer.toolhead.position.z < safe_z %}
  651. G0 Z{safe_z} F{z_drop_feedrate}
  652. {% endif %}
  653.  
  654. _Umbilical_Path
  655.  
  656. _entry_point function=Attach_Probe_intern
  657.  
  658.  
  659.  
  660. G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}
  661. {% if docklocation_z != -128 %}
  662. G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}
  663. {% endif %}
  664.  
  665.  
  666. {% if docklocation_z != -128 %}
  667. G0 Z{docklocation_z} F{dock_feedrate}
  668. {% endif %}
  669. G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}
  670.  
  671.  
  672. {% if docklocation_z != -128 %}
  673. G0 Z{docklocation_z|int - attachmove_z|int} F{z_drop_feedrate}
  674. {% endif %}
  675. G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{release_feedrate}
  676.  
  677.  
  678. {% if printer.toolhead.position.z < safe_z %}
  679. G0 Z{safe_z} F{z_drop_feedrate}
  680. {% endif %}
  681.  
  682. _Park_Toolhead
  683.  
  684. _CheckProbe action=attach
  685.  
  686. _exit_point function=Attach_Probe_intern move={goback}
  687.  
  688. {% elif probe_lock %}
  689. {% if verbose %}
  690. { action_respond_info("Probe locked!") }
  691. {% endif %}
  692.  
  693.  
  694. _CheckProbe action=query
  695.  
  696. {% else %}
  697. {% if verbose %}
  698. { action_respond_info("Probe already attached!") }
  699. {% endif %}
  700.  
  701.  
  702. _CheckProbe action=query
  703.  
  704. {% endif %}
  705.  
  706. _exit_point function=Attach_Probe move={goback}
  707.  
  708. [gcode_macro Dock_Probe]
  709. description = Docks Klicky Probe
  710. gcode =
  711.  
  712. {% set goback = params.back|default(0) %}
  713.  
  714. {% set probe_attached = printer["gcode_macro _Probe_Variables"].probe_attached %}
  715. {% set probe_lock = printer["gcode_macro _Probe_Variables"].probe_lock %}
  716. {% set verbose = printer["gcode_macro _User_Variables"].verbose %}
  717.  
  718. {% set dockmove_x = printer["gcode_macro _User_Variables"].dockmove_x|default(0) %}
  719. {% set dockmove_y = printer["gcode_macro _User_Variables"].dockmove_y|default(0) %}
  720. {% set dockmove_z = printer["gcode_macro _User_Variables"].dockmove_z|default(0) %}
  721. {% set docklocation_x = printer["gcode_macro _User_Variables"].docklocation_x %}
  722. {% set docklocation_y = printer["gcode_macro _User_Variables"].docklocation_y %}
  723. {% set docklocation_z = printer["gcode_macro _User_Variables"].docklocation_z %}
  724. {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %}
  725. {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %}
  726. {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %}
  727.  
  728. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  729.  
  730. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %}
  731. {% set dock_feedrate = printer["gcode_macro _User_Variables"].dock_speed * 60 %}
  732. {% set release_feedrate = printer["gcode_macro _User_Variables"].release_speed * 60 %}
  733. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  734.  
  735.  
  736. {% if dockmove_x == dockmove_y == dockmove_z == 0 %}
  737. { action_raise_error("No dockmove location!! To restore old behavior place 40 in dockmove_x") }
  738. {% endif %}
  739.  
  740. {% if attachmove_x == attachmove_y == attachmove_z == 0 %}
  741. { action_raise_error("No attachmove location!! To restore old behavior place dockarmslenght value in dockmove_x") }
  742. {% endif %}
  743.  
  744.  
  745. {% if not 'xyz' in printer.toolhead.homed_axes %}
  746. { action_raise_error("Must Home X, Y and Z Axis First!") }
  747. {% endif %}
  748.  
  749. _entry_point function=Dock_Probe
  750.  
  751.  
  752. {% if probe_attached and not probe_lock %}
  753. {% if verbose %}
  754. { action_respond_info("Docking Probe") }
  755. {% endif %}
  756.  
  757. {% if printer.toolhead.position.z < safe_z %}
  758. G0 Z{safe_z} F{z_drop_feedrate}
  759. {% endif %}
  760.  
  761. _Umbilical_Path
  762.  
  763.  
  764. G0 X{docklocation_x|int - attachmove_x|int} Y{docklocation_y|int - attachmove_y|int} F{travel_feedrate}
  765. {% if docklocation_z != -128 %}
  766. G0 Z{docklocation_z|int - attachmove_z|int} F{dock_feedrate}
  767. {% endif %}
  768.  
  769.  
  770. G0 X{docklocation_x} Y{docklocation_y} F{dock_feedrate}
  771. {% if docklocation_z != -128 %}
  772. G0 Z{docklocation_z} F{dock_feedrate}
  773. {% endif %}
  774.  
  775.  
  776. {% if docklocation_z != -128 %}
  777. G0 Z{docklocation_z|int + dockmove_z|int} F{release_feedrate}
  778. {% endif %}
  779. G0 X{docklocation_x|int + dockmove_x|int} Y{docklocation_y|int + dockmove_y|int} F{release_feedrate}
  780.  
  781.  
  782. {% if printer.toolhead.position.z < safe_z %}
  783. G0 Z{safe_z} F{z_drop_feedrate}
  784. {% endif %}
  785.  
  786. _Park_Toolhead
  787.  
  788. G4 P1000
  789. _CheckProbe action=dock
  790.  
  791. {% elif probe_lock %}
  792. {% if verbose %}
  793. { action_respond_info("Probe locked") }
  794. {% endif %}
  795.  
  796.  
  797. _CheckProbe action=query
  798.  
  799. {% else %}
  800. {% if verbose %}
  801. { action_respond_info("Probe already docked") }
  802. {% endif %}
  803.  
  804.  
  805. _CheckProbe action=query
  806.  
  807. {% endif %}
  808.  
  809. _exit_point function=Dock_Probe move={goback}
  810.  
  811. [gcode_macro PROBE_CALIBRATE]
  812. rename_existing = _PROBE_CALIBRATE
  813. description = Calibrate the probes z_offset with klicky automount
  814. gcode =
  815. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  816. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  817. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %}
  818. {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %}
  819. {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %}
  820. {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %}
  821. {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %}
  822.  
  823. {% if not 'xyz' in printer.toolhead.homed_axes %}
  824. { action_raise_error("Must Home X, Y and Z Axis First!") }
  825. {% endif %}
  826.  
  827.  
  828. {% if printer['gcode_move'].position.y > (max_y - probe_offset_y)
  829. or printer['gcode_move'].position.y < probe_offset_y
  830. or printer['gcode_move'].position.x > (max_x - probe_offset_x)
  831. or printer['gcode_move'].position.x < probe_offset_x %}
  832. { action_raise_error("Must perform PROBE_CALIBRATE with the probe above the BED!") }
  833. {% endif%}
  834.  
  835. _entry_point function=PROBE_CALIBRATE
  836.  
  837. _CheckProbe action=query
  838. Attach_Probe back=1
  839.  
  840. _PROBE_CALIBRATE {% for p in params
  841. %}{'%s=%s ' % (p, params[p])}{%
  842. endfor %}
  843.  
  844. Dock_Probe back=1
  845.  
  846. _exit_point function=PROBE_CALIBRATE move=1
  847.  
  848. [gcode_macro PROBE_ACCURACY]
  849. rename_existing = _PROBE_ACCURACY
  850. description = Probe Z-height accuracy at current XY position with klicky automount
  851. gcode =
  852. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  853. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  854. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed %}
  855. {% set max_x = printer["gcode_macro _User_Variables"].max_bed_x %}
  856. {% set max_y = printer["gcode_macro _User_Variables"].max_bed_y %}
  857. {% set probe_offset_x = printer['configfile'].config["probe"]["x_offset"]|float %}
  858. {% set probe_offset_y = printer['configfile'].config["probe"]["y_offset"]|float %}
  859.  
  860. {% if not 'xyz' in printer.toolhead.homed_axes %}
  861. { action_raise_error("Must Home X, Y and Z Axis First!") }
  862. {% endif %}
  863.  
  864. _entry_point function=PROBE_ACCURACY
  865.  
  866.  
  867. {% if printer['gcode_move'].position.y > (max_y - probe_offset_y)
  868. or printer['gcode_move'].position.y < probe_offset_y
  869. or printer['gcode_move'].position.x > (max_x - probe_offset_x)
  870. or printer['gcode_move'].position.x < probe_offset_x %}
  871. { action_raise_error("Must perform PROBE_ACCURACY with the probe above the BED!") }
  872. {% endif%}
  873.  
  874. _CheckProbe action=query
  875. Attach_Probe back=1
  876.  
  877. _PROBE_ACCURACY {% for p in params
  878. %}{'%s=%s ' % (p, params[p])}{%
  879. endfor %}
  880.  
  881. Dock_Probe back=1
  882.  
  883. _exit_point function=PROBE_ACCURACY move=1
  884.  
  885. [force_move]
  886. enable_force_move = True
  887.  
  888. [homing_override]
  889. axes = xyz
  890. gcode =
  891.  
  892. _User_Variables
  893. {% set verbose = printer["gcode_macro _User_Variables"].verbose %}
  894. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  895.  
  896. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z %}
  897. {% set enable_z_hop = printer["gcode_macro _User_Variables"].enable_z_hop %}
  898. {% set attachmove_x = printer["gcode_macro _User_Variables"].attachmove_x|default(0) %}
  899. {% set attachmove_y = printer["gcode_macro _User_Variables"].attachmove_y|default(0) %}
  900. {% set attachmove_z = printer["gcode_macro _User_Variables"].attachmove_z|default(0) %}
  901. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  902.  
  903.  
  904. _klicky_check_variables_version
  905.  
  906.  
  907. {% if attachmove_x == attachmove_y == attachmove_z == 0 %}
  908. { action_raise_error("No attachmove location!") }
  909. {% endif %}
  910.  
  911. _CheckProbe action=query
  912.  
  913.  
  914. {% set home_x, home_y, home_z = False, False, False %}
  915.  
  916.  
  917. {% if not 'X' in params
  918. and not 'Y' in params
  919. and not 'Z' in params %}
  920.  
  921. {% set home_x, home_y, home_z = True, True, True %}
  922.  
  923. {% else %}
  924.  
  925. {% if 'X' in params %}
  926. {% set home_x = True %}
  927. {% endif %}
  928.  
  929. {% if 'Y' in params %}
  930. {% set home_y = True %}
  931. {% endif %}
  932.  
  933. {% if 'Z' in params %}
  934. {% set home_z = True %}
  935. {% endif %}
  936.  
  937. {% if 'X' in params
  938. and 'Y' in params
  939. and 'Z' in params %}
  940.  
  941.  
  942. _Homing_Variables reset=1
  943. {% endif %}
  944.  
  945. {% endif %}
  946.  
  947. _entry_point function=homing_override
  948.  
  949.  
  950. {% if 'z' not in printer.toolhead.homed_axes %}
  951. {% if not enable_z_hop %}
  952. {% set safe_z = 0 %}
  953. {% endif %}
  954. {% endif %}
  955.  
  956. {% if home_z %}
  957. {% if 'z' in printer.toolhead.homed_axes %}
  958. {% if printer.toolhead.position.z < safe_z %}
  959. {% if verbose %}
  960. { action_respond_info("Z too low, performing ZHOP") }
  961. {% endif %}
  962. G0 Z{safe_z} F{z_drop_feedrate}
  963. {% endif %}
  964. {% else %}
  965. {% if verbose %}
  966. { action_respond_info("Z not homed, forcing full G28") }
  967. {% endif %}
  968. SET_KINEMATIC_POSITION X=0 Y=0 Z=0
  969. G0 Z{safe_z} F{z_drop_feedrate}
  970. {% set home_x, home_y, home_z = True, True, True %}
  971. {% endif %}
  972. {% endif %}
  973.  
  974.  
  975. {% if attachmove_y == 0 %}
  976.  
  977. {% if home_y %}
  978. {% if verbose %}
  979. { action_respond_info("Homing Y") }
  980. {% endif %}
  981. G28 Y0
  982. {% endif %}
  983. {% set home_y = False %}
  984. {% endif %}
  985.  
  986.  
  987.  
  988. {% if home_x %}
  989. {% if verbose %}
  990. { action_respond_info("Homing X") }
  991. {% endif %}
  992. {% if printer["gcode_macro _HOME_X"] is defined %}
  993. _HOME_X
  994. {% else %}
  995. G28 X0
  996. {% endif %}
  997. {% endif %}
  998.  
  999.  
  1000. {% if home_y %}
  1001. {% if verbose %}
  1002. { action_respond_info("Homing Y") }
  1003. {% endif %}
  1004. {% if printer["gcode_macro _HOME_Y"] is defined %}
  1005. _HOME_Y
  1006. {% else %}
  1007. G28 Y0
  1008. {% endif %}
  1009. {% endif %}
  1010.  
  1011. {% if home_z %}
  1012. {% if verbose %}
  1013. { action_respond_info("Homing Z") }
  1014. {% endif %}
  1015.  
  1016.  
  1017. {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %}
  1018. Attach_Probe
  1019. {% else %}
  1020. Dock_Probe
  1021. {% endif %}
  1022.  
  1023. _Home_Z
  1024.  
  1025.  
  1026. {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %}
  1027. Dock_Probe
  1028. {% endif %}
  1029. {% endif %}
  1030. _CheckProbe action=query
  1031.  
  1032.  
  1033. _Park_Toolhead
  1034.  
  1035. _exit_point function=homing_override
  1036.  
  1037. [gcode_macro _Umbilical_Path]
  1038. gcode =
  1039. {% set umbilical = printer["gcode_macro _User_Variables"].umbilical %}
  1040. {% set umbilical_x = printer["gcode_macro _User_Variables"].umbilical_x %}
  1041. {% set umbilical_y = printer["gcode_macro _User_Variables"].umbilical_y %}
  1042. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  1043. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %}
  1044.  
  1045. {% if umbilical %}
  1046.  
  1047. _entry_point function=Umbilical_Path
  1048.  
  1049. G0 X{umbilical_x} Y{umbilical_y} Z{safe_z} F{travel_feedrate}
  1050.  
  1051. _exit_point function=Umbilical_Path
  1052. {% endif %}
  1053.  
  1054. [gcode_macro _Home_Z]
  1055. gcode =
  1056. {% set z_endstop_x = printer["gcode_macro _Probe_Variables"].z_endstop_x %}
  1057. {% set z_endstop_y = printer["gcode_macro _Probe_Variables"].z_endstop_y %}
  1058. {% set safe_z = printer["gcode_macro _User_Variables"].safe_z|float %}
  1059. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %}
  1060. {% set z_drop_feedrate = printer["gcode_macro _User_Variables"].z_drop_speed * 60 %}
  1061. {% set verbose = printer["gcode_macro _User_Variables"].verbose %}
  1062.  
  1063. _entry_point function=Home_Z
  1064.  
  1065.  
  1066. {% if not 'xy' in printer.toolhead.homed_axes %}
  1067. { action_raise_error("Must Home X and Y Axis First!") }
  1068. {% else %}
  1069. {% if not 'z' in printer.toolhead.homed_axes %}
  1070. {% if verbose %}
  1071. { action_respond_info("Resetting Z position to zero") }
  1072. {% endif %}
  1073. SET_KINEMATIC_POSITION Z=0
  1074. {% endif %}
  1075.  
  1076.  
  1077.  
  1078. G0 X{z_endstop_x} Y{z_endstop_y} F{travel_feedrate}
  1079. G28 Z0
  1080. G0 Z{safe_z} F{z_drop_feedrate}
  1081. {% endif %}
  1082.  
  1083. _exit_point function=Home_Z
  1084.  
  1085. [gcode_macro _CheckProbe]
  1086. variable_probe_state = 0
  1087. gcode =
  1088. Query_Probe
  1089. _SetProbeState action={ ACTION }
  1090.  
  1091. [gcode_macro _SetProbeState]
  1092. gcode =
  1093. {% set query_probe_triggered = printer.probe.last_query %}
  1094. {% set action = params.ACTION|default('') %}
  1095.  
  1096.  
  1097. {% if query_probe_triggered %}
  1098. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ False }
  1099. {% else %}
  1100.  
  1101. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_attached VALUE={ True }
  1102. {% endif %}
  1103.  
  1104. {% if action == 'query' %}
  1105. SET_GCODE_VARIABLE MACRO=_Probe_Variables VARIABLE=probe_state VALUE={ query_probe_triggered }
  1106. {% endif %}
  1107.  
  1108.  
  1109.  
  1110.  
  1111. {% if not query_probe_triggered and action == 'dock' %}
  1112. { action_raise_error("Probe dock failed!") }
  1113. {% endif %}
  1114.  
  1115.  
  1116. {% if query_probe_triggered and action == 'attach' %}
  1117. { action_raise_error("Probe attach failed!") }
  1118. {% endif %}
  1119.  
  1120. [gcode_macro _Park_Toolhead]
  1121. gcode =
  1122. {% set park_toolhead = printer["gcode_macro _User_Variables"].park_toolhead %}
  1123. {% set parkposition_x = printer["gcode_macro _User_Variables"].parkposition_x %}
  1124. {% set parkposition_y = printer["gcode_macro _User_Variables"].parkposition_y %}
  1125. {% set parkposition_z = printer["gcode_macro _User_Variables"].parkposition_z %}
  1126. {% set travel_feedrate = printer["gcode_macro _User_Variables"].travel_speed * 60 %}
  1127. {% set verbose = printer["gcode_macro _User_Variables"].verbose %}
  1128.  
  1129. _entry_point function=Park_Toolhead
  1130.  
  1131. {% if park_toolhead and 'xyz' in printer.toolhead.homed_axes %}
  1132. {% if verbose %}
  1133. { action_respond_info("Parking Toolhead") }
  1134. {% endif %}
  1135. G0 X{parkposition_x} Y{parkposition_y} Z{parkposition_z} F{travel_feedrate}
  1136. {% endif %}
  1137. _exit_point function=Park_Toolhead
  1138.  
  1139. [gcode_macro Z_TILT_ADJUST]
  1140. description =
  1141. gcode =
  1142. {% set V = printer["gcode_macro _User_Variables"].verbose %}
  1143. {% if V %}
  1144. { action_respond_info("Z Tilt Adjust") }
  1145. {% endif %}
  1146.  
  1147. _CheckProbe action=query
  1148. Attach_Probe
  1149.  
  1150. _Z_TILT_ADJUST {% for p in params
  1151. %}{'%s=%s ' % (p, params[p])}{%
  1152. endfor %}
  1153. Dock_Probe
  1154. G28 Z0
  1155.  
  1156. [gcode_macro BED_MESH_CALIBRATE]
  1157. description = Perform Mesh Bed Leveling with klicky automount
  1158. gcode =
  1159.  
  1160. {% set V = printer["gcode_macro _User_Variables"].verbose %}
  1161. {% if V %}
  1162. { action_respond_info("Bed Mesh Calibrate") }
  1163. {% endif %}
  1164.  
  1165. _CheckProbe action=query
  1166. Attach_Probe
  1167.  
  1168. _BED_MESH_CALIBRATE {% for p in params
  1169. %}{'%s=%s ' % (p, params[p])}{%
  1170. endfor %}
  1171.  
  1172. Dock_Probe
  1173.  
  1174. [temperature_sensor RPi]
  1175. sensor_type = temperature_host
  1176. min_temp = 10
  1177. max_temp = 100
  1178.  
  1179. [temperature_sensor mcu_temp]
  1180. sensor_type = temperature_mcu
  1181. min_temp = 0
  1182. max_temp = 100
  1183.  
  1184. [temperature_sensor Tool_Head]
  1185. sensor_type = temperature_mcu
  1186. sensor_mcu = MKS_THR
  1187.  
  1188. [printer]
  1189. kinematics = corexy
  1190. max_z_velocity = 10
  1191. max_z_accel = 30
  1192. max_accel = 4000
  1193. max_velocity = 300
  1194. square_corner_velocity = 5.0
  1195.  
  1196. [idle_timeout]
  1197. timeout = 1800
  1198.  
  1199. [heater_fan electronics]
  1200. pin = electronics_fan_pin
  1201. max_power = 1.0
  1202. kick_start_time = 0.5
  1203. heater = extruder
  1204. heater_temp = 50.0
  1205. fan_speed = 0.2
  1206. off_below = 0.10
  1207.  
  1208. [heater_bed]
  1209. heater_pin = bed_heater_pin
  1210. sensor_pin = bed_thermistor_pin
  1211. sensor_type = Generic 3950
  1212. max_power = 0.6
  1213. min_temp = 0
  1214. max_temp = 120
  1215. control = pid
  1216. pid_kp = 58.437
  1217. pid_ki = 2.347
  1218. pid_kd = 363.769
  1219. =======================
  1220. Extruder max_extrude_ratio=0.266081
  1221. Config error
  1222. Traceback (most recent call last):
  1223. File "/home/mks/klipper/klippy/klippy.py", line 175, in _connect
  1224. self._read_config()
  1225. File "/home/mks/klipper/klippy/klippy.py", line 145, in _read_config
  1226. pconfig.check_unused_options(config)
  1227. File "/home/mks/klipper/klippy/configfile.py", line 305, in check_unused_options
  1228. % (option, section))
  1229. configparser.Error: Option 'restart_method' is not valid in section 'mcu'
  1230. webhooks client 281473612662040: New connection
  1231. webhooks client 281473612662040: Client info {'program': 'Moonraker', 'version': 'v0.8.0-45-gc41c588'}
  1232.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement