Advertisement
Guest User

Untitled

a guest
Mar 18th, 2024
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.51 KB | None | 0 0
  1. # This file is an example config file for cartesian style printers.
  2. # One may copy and edit this file to configure a new cartesian
  3. # printer.
  4.  
  5. # DO NOT COPY THIS FILE WITHOUT CAREFULLY READING AND UPDATING IT
  6. # FIRST. Incorrectly configured parameters may cause damage.
  7.  
  8. # See docs/Config_Reference.md for a description of parameters.
  9.  
  10. [exclude_object]
  11. [include KAMP_Settings.cfg]
  12.  
  13. [stepper_x]
  14. step_pin: PD6
  15. dir_pin: !PD11
  16. enable_pin: !PC6
  17. microsteps: 16
  18. rotation_distance: 40
  19. endstop_pin: ^!PC14
  20. position_endstop: 0
  21. position_max: 300
  22. homing_speed: 15.0
  23.  
  24. [tmc2660 stepper_x]
  25. cs_pin: PD14
  26. spi_bus: usart1
  27. run_current: 1.000
  28. sense_resistor: 0.051
  29.  
  30. [stepper_y]
  31. step_pin: PD7
  32. dir_pin: PD12
  33. enable_pin: !PC6
  34. microsteps: 16
  35. rotation_distance: 40
  36. endstop_pin: ^!PA2
  37. position_endstop: 0
  38. position_max: 300
  39. homing_speed: 15.0
  40.  
  41. [tmc2660 stepper_y]
  42. cs_pin: PC9
  43. spi_bus: usart1
  44. run_current: 1.000
  45. sense_resistor: 0.051
  46.  
  47. [stepper_z]
  48. step_pin: PD8
  49. dir_pin: !PD13
  50. enable_pin: !PC6
  51. microsteps: 16
  52. rotation_distance: 8
  53. endstop_pin: probe:z_virtual_endstop
  54. #endstop_pin: ^PD29
  55. #endstop_pin: PD10 # E0 endstop
  56. #endstop_pin: PC16 # E1 endstop
  57. #position_endstop: 0.5
  58. position_min: -2
  59. position_max: 400
  60.  
  61. [tmc2660 stepper_z]
  62. cs_pin: PC10
  63. spi_bus: usart1
  64. run_current: 1.000
  65. sense_resistor: 0.051
  66.  
  67. [safe_z_home]
  68. home_xy_position: 150, 150
  69. z_hop: 50
  70. ;z_offset: 0
  71.  
  72. [bltouch]
  73. sensor_pin: ^PC1
  74. control_pin: PC3
  75. #z_offset:0
  76. x_offset: 25
  77. stow_on_each_sample: false
  78. #adaptive_margin: 5
  79.  
  80. [bed_mesh]
  81. speed: 120
  82. horizontal_move_z: 5
  83. mesh_min: 25, 0
  84. mesh_max: 300, 300
  85. probe_count: 6, 6
  86.  
  87. [extruder]
  88. step_pin: PD5
  89. dir_pin: !PA1
  90. enable_pin: !PC6
  91. microsteps: 16
  92. #rotation_distance: 7.82
  93. rotation_distance: 8.1237 # hemera default 7.82
  94. nozzle_diameter: 0.400
  95. filament_diameter: 1.750
  96. heater_pin: !PA20
  97. sensor_type: EPCOS 100K B57560G104F
  98. sensor_pin: PC15
  99. #control: pid
  100. #pid_Kp: 22.2
  101. #pid_Ki: 1.08
  102. #pid_Kd: 114
  103. min_temp: 0
  104. max_temp: 300
  105. min_extrude_temp: 175
  106. max_extrude_only_distance: 1000
  107.  
  108. [tmc2660 extruder]
  109. cs_pin: PC17
  110. spi_bus: usart1
  111. run_current: 0.847 #hemera with safety margin: (1.33 * 0.9) / 1.414 = 0.847 w/o: 0.94
  112. sense_resistor: 0.051
  113.  
  114. [fan]
  115. #pin: PC26 # FAN1, heatbrake
  116. #pin: PA0 #Fan 2
  117. pin: PC23 #part fan
  118.  
  119. [heater_bed]
  120. heater_pin: !PA19
  121. sensor_type: EPCOS 100K B57560G104F
  122. sensor_pin: PC13
  123. #control: watermark
  124. min_temp: 0
  125. max_temp: 110
  126.  
  127. [mcu]
  128. serial: /dev/serial/by-id/usb-Klipper_sam4e8e_00313753314E33383038303536303331-if00
  129.  
  130. [include mainsail.cfg]
  131.  
  132. [printer]
  133. kinematics: cartesian
  134. max_velocity: 500
  135. max_accel: 3000
  136. max_z_velocity: 25
  137. max_z_accel: 30
  138.  
  139. [filament_switch_sensor switch_sensor]
  140. switch_pin: PC16
  141. pause_on_runout: False
  142. runout_gcode:
  143. PAUSE # [pause_resume] is required in printer.cfg
  144. M117 Filament switch runout
  145. insert_gcode:
  146. M117 Filament switch inserted
  147.  
  148. [filament_motion_sensor encoder_sensor]
  149. switch_pin: PD10
  150. detection_length: 2.88
  151. extruder: extruder
  152. pause_on_runout: False
  153. runout_gcode:
  154. PAUSE # [pause_resume] is required in printer.cfg
  155. M117 Filament encoder runout
  156. insert_gcode:
  157. M117 Filament encoder inserted
  158.  
  159. [gcode_macro LOAD_FILAMENT]
  160. variable_load_distance: 50
  161. variable_purge_distance: 25
  162. gcode:
  163. {% set speed = params.SPEED|default(300) %}
  164. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
  165. SAVE_GCODE_STATE NAME=load_state
  166. G91
  167. G92 E0
  168. G1 E{load_distance} F{max_velocity} # fast-load
  169. G1 E{purge_distance} F{speed} # purge
  170. RESTORE_GCODE_STATE NAME=load_state
  171.  
  172. [gcode_macro UNLOAD_FILAMENT]
  173. variable_unload_distance: 50
  174. variable_purge_distance: 25
  175. gcode:
  176. {% set speed = params.SPEED|default(300) %}
  177. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
  178. SAVE_GCODE_STATE NAME=unload_state
  179. G91
  180. G92 E0
  181. G1 E{purge_distance} F{speed} # purge
  182. G1 E-{unload_distance} F{max_velocity} # fast-unload
  183. RESTORE_GCODE_STATE NAME=unload_state
  184.  
  185. [gcode_macro PANELDUE_BEEP]
  186. # Beep frequency
  187. #default_parameter_FREQUENCY: 300
  188. # Beep duration in seconds
  189. #default_parameter_DURATION: 1.
  190. gcode:
  191. {action_call_remote_method("paneldue_beep",
  192. frequency=FREQUENCY|int,
  193. duration=DURATION|float)}
  194.  
  195. ## Client variable macro for your printer.cfg
  196. [gcode_macro _CLIENT_VARIABLE]
  197. variable_use_custom_pos : True ; use custom park coordinates for x,y [True/False]
  198. variable_custom_park_x : 275.0 ; custom x position; value must be within your defined min and max of X
  199. variable_custom_park_y : 290.0 ; custom y position; value must be within your defined min and max of Y
  200. variable_custom_park_dz : 50.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
  201. #variable_retract : 1.0 ; the value to retract while PAUSE
  202. #variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
  203. #variable_speed_retract : 35.0 ; retract speed in mm/s
  204. #variable_unretract : 1.0 ; the value to unretract while RESUME
  205. #variable_speed_unretract : 35.0 ; unretract speed in mm/s
  206. #variable_speed_hop : 15.0 ; z move speed in mm/s
  207. #variable_speed_move : 100.0 ; move speed in mm/s
  208. #variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
  209. #variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
  210. #variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
  211. ## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
  212. #variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
  213. #variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
  214. #variable_runout_sensor : "" ; If a sensor is defined, it will be used to cancel the execution of RESUME in case no filament is detected.
  215. ## Specify the config name of the runout sensor e.g "filament_switch_sensor runout". Hint use the same as in your printer.cfg
  216. ## !!! Custom macros, please use with care and review the section of the corresponding macro.
  217. ## These macros are for simple operations like setting a status LED. Please make sure your macro does not interfere with the basic macro functions.
  218. ## Only single line commands are supported, please create a macro if you need more than one command.
  219. #variable_user_pause_macro : "" ; Everything inside the "" will be executed after the klipper base pause (PAUSE_BASE) function
  220. #variable_user_resume_macro: "" ; Everything inside the "" will be executed before the klipper base resume (RESUME_BASE) function
  221. #variable_user_cancel_macro: "" ; Everything inside the "" will be executed before the klipper base cancel (CANCEL_PRINT_BASE) function
  222. gcode: PAUSE X=250 Y=280 Z_MIN=50
  223.  
  224. #####################################################################
  225. # print_start macro
  226. #####################################################################
  227.  
  228. ## *** THINGS TO UNCOMMENT: ***
  229. ## Bed mesh (2 lines at 2 locations)
  230. ## Z_TILT_ADJUST if your printer is a Trident
  231. ## Quad gantry level if your printer is a V2
  232. ## Nevermore - if you have one
  233.  
  234. [gcode_macro PRINT_START]
  235. gcode:
  236. # This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer.
  237. {% set target_bed = params.BED|int %}
  238. {% set target_extruder = params.EXTRUDER|int %}
  239. {% set target_chamber = params.CHAMBER|default("40")|int %}
  240. {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
  241. {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}
  242.  
  243. ## Uncomment for bed mesh (1 of 2)
  244. BED_MESH_CLEAR # Clears old saved bed mesh (if any)
  245.  
  246. # Checks if the bed temp is higher than 90c - if so then trigger a heatsoak.
  247. {% if params.BED|int > 90 %}
  248. SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
  249. STATUS_HEATING # Sets SB-leds to heating-mode
  250. M106 S255 # Turns on the PT-fan
  251.  
  252. ## Uncomment if you have a Nevermore.
  253. #SET_PIN PIN=nevermore VALUE=1 # Turns on the nevermore
  254.  
  255. #G1 X{x_wait} Y{y_wait} Z50 F9000 # Goes to center of the bed
  256. M190 S{target_bed} # Sets the target temp for the bed
  257. SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info
  258.  
  259. # If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak
  260. {% else %}
  261. SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
  262. STATUS_HEATING # Sets SB-leds to heating-mode
  263. #G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
  264. M190 S{target_bed} # Sets the target temp for the bed
  265. #SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info
  266. #G4 P300000 # Waits 5 min for the bedtemp to stabilize
  267. {% endif %}
  268.  
  269. # Heating nozzle to 150 degrees. This helps with getting a correct Z-home
  270. SET_DISPLAY_TEXT MSG="Hotend: 150c" # Displays info
  271. M109 S150 # Heats the nozzle to 150c
  272.  
  273. # Homes the printer, sets absolute positioning and updates the Stealthburner leds.
  274. STATUS_HOMING # Sets SB-leds to homing-mode
  275. G28 # Full home (XYZ)
  276. G90 # Absolut position
  277.  
  278. ## Uncomment for Trident (Z_TILT_ADJUST)
  279. #SET_DISPLAY_TEXT MSG="Z-tilt adjust" # Displays info
  280. #STATUS_LEVELING # Sets SB-leds to leveling-mode
  281. #Z_TILT_ADJUST # Levels the buildplate via z_tilt_adjust
  282. #G28 Z # Homes Z again after z_tilt_adjust
  283.  
  284. ## Uncomment for V2 (Quad gantry level AKA QGL)
  285. #SET_DISPLAY_TEXT MSG="QGL" # Displays info
  286. #STATUS_LEVELING # Sets SB-leds to leveling-mode
  287. #quad_gantry_level # Levels the buildplate via QGL
  288. #G28 Z # Homes Z again after QGL
  289.  
  290. ## Uncomment for Klicky auto-z
  291. #CALIBRATE_Z # Calibrates Z-offset with klicky
  292. #SET_DISPLAY_TEXT MSG="Z-offset" # Displays info
  293.  
  294. ## Uncomment for bed mesh (2 of 2)
  295. SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info
  296. STATUS_MESHING # Sets SB-leds to bed mesh-mode
  297. bed_mesh_calibrate # Starts bed mesh
  298.  
  299. # Heats up the nozzle up to target via data from slicer
  300. SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info
  301. STATUS_HEATING # Sets SB-leds to heating-mode
  302. G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
  303. M107 # Turns off partcooling fan
  304. M109 S{target_extruder} # Heats the nozzle to printing temp
  305.  
  306. # Gets ready to print by doing a purge line and updating the SB-leds
  307. SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info
  308. G0 X{x_wait - 50} Y4 F10000 # Moves to starting point
  309. G0 Z0.4 # Raises Z to 0.4
  310. G91 # Incremental positioning
  311. G1 X100 E20 F1000 # Purge line
  312. G90 # Absolut position
  313.  
  314. #*# <---------------------- SAVE_CONFIG ---------------------->
  315. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  316. #*#
  317. #*# [stepper_z]
  318. #*# position_endstop = 1.210
  319. #*#
  320. #*# [heater_bed]
  321. #*# control = pid
  322. #*# pid_kp = 71.530
  323. #*# pid_ki = 0.971
  324. #*# pid_kd = 1317.054
  325. #*#
  326. #*# [extruder]
  327. #*# control = pid
  328. #*# pid_kp = 28.343
  329. #*# pid_ki = 1.500
  330. #*# pid_kd = 133.922
  331. #*#
  332. #*# [bltouch]
  333. #*# z_offset = 1.850
  334. #*#
  335. #*# [bed_mesh default]
  336. #*# version = 1
  337. #*# points =
  338. #*# 0.122500, 0.050000, -0.057500
  339. #*# 0.137500, -0.015000, -0.027500
  340. #*# 0.167500, 0.082500, -0.095000
  341. #*# x_count = 3
  342. #*# y_count = 3
  343. #*# mesh_x_pps = 2
  344. #*# mesh_y_pps = 2
  345. #*# algo = lagrange
  346. #*# tension = 0.2
  347. #*# min_x = 100.4
  348. #*# max_x = 199.57
  349. #*# min_y = 100.4
  350. #*# max_y = 199.57
  351.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement