Advertisement
Guest User

help with klipper

a guest
May 15th, 2025
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.57 KB | None | 0 0
  1.  
  2. Starting Klippy...
  3. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  4. Git version: 'v0.13.0-112-g82f540bb'
  5. Branch: master
  6. Remote: origin
  7. Tracked URL: https://github.com/Klipper3d/klipper.git
  8. CPU: 4 core ?
  9. Python: '3.9.2 (default, Mar 20 2025, 02:07:39) \n[GCC 10.2.1 20210110]'
  10. Start printer at Thu May 15 21:08:11 2025 (1747357691.9 30.9)
  11. ===== Config file =====
  12. [gcode_macro G29]
  13. gcode =
  14. G28
  15. BED_MESH_CALIBRATE
  16. BED_MESH_PROFILE SAVE=p1
  17. G1 X175 Y175 Z5 F4000
  18.  
  19. [virtual_sdcard]
  20. path = ~/printer_data/gcodes
  21. on_error_gcode = CANCEL_PRINT
  22.  
  23. [pause_resume]
  24.  
  25. [display_status]
  26.  
  27. [respond]
  28.  
  29. [gcode_macro CANCEL_PRINT]
  30. description = Cancel the actual running print
  31. rename_existing = CANCEL_PRINT_BASE
  32. gcode =
  33.  
  34. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  35. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  36. {% set retract = client.cancel_retract|default(5.0)|abs %}
  37.  
  38. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  39. else "X=" ~ client.park_at_cancel_x %}
  40. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  41. else "Y=" ~ client.park_at_cancel_y %}
  42. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  43.  
  44.  
  45. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  46. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  47. {% endif %}
  48. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  49. _CLIENT_RETRACT LENGTH={retract}
  50. TURN_OFF_HEATERS
  51. M106 S0
  52. {client.user_cancel_macro|default("")}
  53. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  54.  
  55. SET_PAUSE_NEXT_LAYER ENABLE=0
  56. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  57. CANCEL_PRINT_BASE
  58.  
  59. [gcode_macro PAUSE]
  60. description = Pause the actual running print
  61. rename_existing = PAUSE_BASE
  62. gcode =
  63.  
  64. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  65. {% set idle_timeout = client.idle_timeout|default(0) %}
  66. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  67. {% set restore = False if printer.toolhead.extruder == ''
  68. else True if params.RESTORE|default(1)|int == 1 else False %}
  69.  
  70. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  71.  
  72. {% if idle_timeout > 0 %}
  73. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  74. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  75. {% endif %}
  76. PAUSE_BASE
  77. {client.user_pause_macro|default("")}
  78. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  79.  
  80. [gcode_macro RESUME]
  81. description = Resume the actual running print
  82. rename_existing = RESUME_BASE
  83. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  84. variable_restore_idle_timeout = 0
  85. variable_idle_state = False
  86. gcode =
  87.  
  88. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  89. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  90. {% set sp_move = client.speed_move|default(velocity) %}
  91. {% set runout_resume = True if client.runout_sensor|default("") == ""
  92. else True if not printer[client.runout_sensor].enabled
  93. else printer[client.runout_sensor].filament_detected %}
  94. {% set can_extrude = True if printer.toolhead.extruder == ''
  95. else printer[printer.toolhead.extruder].can_extrude %}
  96. {% set do_resume = False %}
  97. {% set prompt_txt = [] %}
  98.  
  99.  
  100. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  101. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  102. {% if last_extruder_temp.restore %}
  103.  
  104. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  105. M109 S{last_extruder_temp.temp}
  106. {% set do_resume = True %}
  107. {% elif can_extrude %}
  108. {% set do_resume = True %}
  109. {% else %}
  110. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  111. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  112. {% endif %}
  113.  
  114. {% elif can_extrude %}
  115. {% set do_resume = True %}
  116. {% else %}
  117. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  118. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  119. {% endif %}
  120. {% if runout_resume %}
  121. {% if do_resume %}
  122. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  123. {client.user_resume_macro|default("")}
  124. _CLIENT_EXTRUDE
  125. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  126. {% endif %}
  127. {% else %}
  128. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  129. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  130. {% endif %}
  131.  
  132. {% if not (runout_resume and do_resume) %}
  133. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  134. {% for element in prompt_txt %}
  135. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  136. {% endfor %}
  137. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  138. RESPOND TYPE=command MSG="action:prompt_show"
  139. {% endif %}
  140.  
  141. [gcode_macro SET_PAUSE_NEXT_LAYER]
  142. description = Enable a pause if the next layer is reached
  143. gcode =
  144. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  145. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  146. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  147. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  148.  
  149. [gcode_macro SET_PAUSE_AT_LAYER]
  150. description = Enable/disable a pause if a given layer number is reached
  151. gcode =
  152. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  153. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  154. else params.LAYER is defined %}
  155. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  156. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  157. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  158.  
  159. [gcode_macro SET_PRINT_STATS_INFO]
  160. rename_existing = SET_PRINT_STATS_INFO_BASE
  161. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  162. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  163. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  164. gcode =
  165. {% if pause_next_layer.enable %}
  166. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  167. {pause_next_layer.call}
  168. SET_PAUSE_NEXT_LAYER ENABLE=0
  169. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  170. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  171. {pause_at_layer.call}
  172. SET_PAUSE_AT_LAYER ENABLE=0
  173. {% endif %}
  174. SET_PRINT_STATS_INFO_BASE {rawparams}
  175.  
  176. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  177. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  178. gcode =
  179.  
  180. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  181. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  182. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  183. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  184. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  185. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  186. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  187. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  188.  
  189. {% set origin = printer.gcode_move.homing_origin %}
  190. {% set act = printer.gcode_move.gcode_position %}
  191. {% set max = printer.toolhead.axis_maximum %}
  192. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  193. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  194. else False %}
  195.  
  196. {% set z_min = params.Z_MIN|default(0)|float %}
  197. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  198. {% set x_park = params.X if params.X is defined
  199. else custom_park_x if use_custom
  200. else 0.0 if round_bed
  201. else (max.x - 5.0) %}
  202. {% set y_park = params.Y if params.Y is defined
  203. else custom_park_y if use_custom
  204. else (max.y - 5.0) if round_bed and z_park < cone
  205. else 0.0 if round_bed
  206. else (max.y - 5.0) %}
  207.  
  208. _CLIENT_RETRACT
  209. {% if "xyz" in printer.toolhead.homed_axes %}
  210. G90
  211. G1 Z{z_park} F{sp_hop}
  212. G1 X{x_park} Y{y_park} F{sp_move}
  213. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  214. {% else %}
  215. RESPOND TYPE=echo MSG='Printer not homed'
  216. {% endif %}
  217.  
  218. [gcode_macro _CLIENT_EXTRUDE]
  219. description = Extrudes, if the extruder is hot enough
  220. gcode =
  221.  
  222. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  223. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  224. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  225. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  226. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  227.  
  228. {% if printer.toolhead.extruder != '' %}
  229. {% if printer[printer.toolhead.extruder].can_extrude %}
  230. {% if use_fw_retract %}
  231. {% if length < 0 %}
  232. G10
  233. {% else %}
  234. G11
  235. {% endif %}
  236. {% else %}
  237. M83
  238. G1 E{length} F{(speed|float|abs) * 60}
  239. {% if absolute_extrude %}
  240. M82
  241. {% endif %}
  242. {% endif %}
  243. {% else %}
  244. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  245. {% endif %}
  246. {% endif %}
  247.  
  248. [gcode_macro _CLIENT_RETRACT]
  249. description = Retracts, if the extruder is hot enough
  250. gcode =
  251. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  252. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  253. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  254.  
  255. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  256.  
  257. [gcode_macro _CLIENT_LINEAR_MOVE]
  258. description = Linear move with save and restore of the gcode state
  259. gcode =
  260. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  261. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  262. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  263. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  264. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  265. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  266. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  267. SAVE_GCODE_STATE NAME=_client_movement
  268. {% if x_move or y_move or z_move %}
  269. G9{ 0 if ABSOLUTE else 1 }
  270. {% endif %}
  271. {% if e_move %}
  272. M8{ 2 if ABSOLUTE_E else 3 }
  273. {% endif %}
  274. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  275. RESTORE_GCODE_STATE NAME=_client_movement
  276.  
  277. [screws_tilt_adjust]
  278. screw1 = 291, 49
  279. screw1_name = back left screw
  280. screw2 = 0, 49
  281. screw2_name = back right screw
  282. screw3 = 0, 309
  283. screw3_name = front right screw
  284. screw4 = 291, 309
  285. screw4_name = front left screw
  286. horizontal_move_z = 10
  287. speed = 125
  288. screw_thread = CW-M4
  289.  
  290. [bltouch]
  291. sensor_pin = ^PC2
  292. control_pin = PA1
  293. x_offset = -44
  294. y_offset = -7
  295. pin_move_time = 0.4
  296. probe_with_touch_mode = True
  297. pin_up_touch_mode_reports_triggered = False
  298. stow_on_each_sample = True
  299. z_offset = 3.770
  300.  
  301. [safe_z_home]
  302. home_xy_position = 175,175
  303. speed = 250
  304. z_hop = 10
  305. z_hop_speed = 5
  306.  
  307. [stepper_x]
  308. step_pin = PB13
  309. dir_pin = PB12
  310. enable_pin = !PB14
  311. microsteps = 16
  312. rotation_distance = 40
  313. endstop_pin = ^PC0
  314. position_endstop = 0
  315. position_max = 360
  316. homing_speed = 50
  317.  
  318. [tmc2209 stepper_x]
  319. uart_pin = PC11
  320. tx_pin = PC10
  321. uart_address = 0
  322. run_current = 0.580
  323. stealthchop_threshold = 999999
  324.  
  325. [stepper_y]
  326. step_pin = PB10
  327. dir_pin = PB2
  328. enable_pin = !PB11
  329. microsteps = 16
  330. rotation_distance = 40
  331. endstop_pin = ^PC1
  332. position_endstop = 0
  333. position_max = 360
  334. homing_speed = 50
  335.  
  336. [tmc2209 stepper_y]
  337. uart_pin = PC11
  338. tx_pin = PC10
  339. uart_address = 2
  340. run_current = 0.580
  341. stealthchop_threshold = 999999
  342.  
  343. [stepper_z]
  344. step_pin = PB0
  345. dir_pin = !PC5
  346. enable_pin = !PB1
  347. microsteps = 16
  348. rotation_distance = 8
  349. endstop_pin = probe:z_virtual_endstop
  350. position_min = -6
  351. position_max = 400
  352.  
  353. [tmc2209 stepper_z]
  354. uart_pin = PC11
  355. tx_pin = PC10
  356. uart_address = 1
  357. run_current = 0.580
  358. stealthchop_threshold = 999999
  359.  
  360. [extruder]
  361. step_pin = PB3
  362. dir_pin = !PB4
  363. enable_pin = !PD1
  364. microsteps = 16
  365. rotation_distance = 33.500
  366. nozzle_diameter = 0.400
  367. filament_diameter = 1.750
  368. heater_pin = PC8
  369. sensor_type = EPCOS 100K B57560G104F
  370. sensor_pin = PA0
  371. control = pid
  372. pid_kp = 21.527
  373. pid_ki = 1.063
  374. pid_kd = 108.982
  375. min_temp = 0
  376. max_temp = 250
  377.  
  378. [tmc2209 extruder]
  379. uart_pin = PC11
  380. tx_pin = PC10
  381. uart_address = 3
  382. run_current = 0.650
  383.  
  384. [heater_bed]
  385. heater_pin = PC9
  386. sensor_type = EPCOS 100K B57560G104F
  387. sensor_pin = PC4
  388. control = pid
  389. pid_kp = 54.027
  390. pid_ki = 0.770
  391. pid_kd = 948.182
  392. min_temp = 0
  393. max_temp = 130
  394.  
  395. [heater_fan heatbreak_cooling_fan]
  396. pin = PC7
  397.  
  398. [heater_fan controller_fan]
  399. pin = PB15
  400.  
  401. [fan]
  402. pin = PC6
  403.  
  404. [mcu]
  405. serial = /dev/serial/by-id/usb-Klipper_stm32g0b1xx_3000130015504D5930393520-if00
  406.  
  407. [printer]
  408. kinematics = cartesian
  409. max_velocity = 300
  410. max_accel = 3000
  411. max_z_velocity = 5
  412. max_z_accel = 100
  413.  
  414. [board_pins]
  415. aliases =
  416.  
  417. EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
  418. EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PD6, EXP1_10=<5V>
  419. =======================
  420. Extruder max_extrude_ratio=0.266081
  421. Unhandled exception during connect
  422. Traceback (most recent call last):
  423. File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
  424. self._read_config()
  425. File "/home/pi/klipper/klippy/klippy.py", line 125, in _read_config
  426. m.add_printer_objects(config)
  427. File "/home/pi/klipper/klippy/toolhead.py", line 733, in add_printer_objects
  428. kinematics.extruder.add_printer_objects(config)
  429. File "/home/pi/klipper/klippy/kinematics/extruder.py", line 314, in add_printer_objects
  430. pe = PrinterExtruder(config.getsection(section), i)
  431. File "/home/pi/klipper/klippy/kinematics/extruder.py", line 177, in __init__
  432. self.extruder_stepper = ExtruderStepper(config)
  433. File "/home/pi/klipper/klippy/kinematics/extruder.py", line 21, in __init__
  434. ffi_lib.extruder_stepper_free)
  435. File "/home/pi/klippy-env/lib/python3.9/site-packages/cffi/api.py", line 912, in __getattr__
  436. make_accessor(name)
  437. File "/home/pi/klippy-env/lib/python3.9/site-packages/cffi/api.py", line 908, in make_accessor
  438. accessors[name](name)
  439. File "/home/pi/klippy-env/lib/python3.9/site-packages/cffi/api.py", line 838, in accessor_function
  440. value = backendlib.load_function(BType, name)
  441. AttributeError: function/symbol 'extruder_stepper_free' not found in library '/home/pi/klipper/klippy/chelper/c_helper.so': /home/pi/klipper/klippy/chelper/c_helper.so: undefined symbol: extruder_stepper_free
  442. webhooks client 547820642368: New connection
  443. webhooks client 547820642368: Client info {'program': 'Moonraker', 'version': 'v0.9.3-74-g1c12414'}
  444.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement