Advertisement
Pitoer

ghost9000

Mar 3rd, 2021 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. [include kiauh_macros.cfg]
  2. #Fylingbear Ghost5
  3.  
  4. ########################################
  5. # PRINTER configuration
  6. ########################################
  7.  
  8. [stepper_y]
  9. step_pin: PE0
  10. dir_pin: PB9
  11. enable_pin: !PE1
  12. microsteps: 16
  13. rotation_distance: 40
  14. endstop_pin: !PA12
  15. position_endstop: 0
  16. position_max: 330
  17. homing_speed: 50
  18.  
  19. [stepper_x]
  20. step_pin: PE3
  21. dir_pin: PE2
  22. enable_pin: !PE4
  23. microsteps: 16
  24. rotation_distance: 40
  25. endstop_pin: !PA15
  26. position_endstop: 0
  27. position_max: 260
  28. homing_speed: 50
  29.  
  30. [stepper_z]
  31. step_pin: PB5
  32. dir_pin: PB4
  33. enable_pin: !PB8
  34. microsteps: 16
  35. rotation_distance: 8
  36. endstop_pin: !PA11
  37. position_endstop: 0.5
  38. position_max: 240
  39.  
  40. [mcu]
  41. serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  42. restart_method = command
  43.  
  44. [printer]
  45. kinematics: cartesian
  46. max_velocity: 300
  47. max_accel: 4500
  48. max_z_velocity: 40
  49. max_z_accel: 200
  50.  
  51. square_corner_velocity: 5
  52.  
  53. max_accel: 10000
  54. max_accel_to_decel: 10000
  55.  
  56. #[mcu rpi]
  57. #serial: /tmp/klipper_host_mcu
  58.  
  59. #[adxl345]
  60. #cs_pin: rpi:None
  61.  
  62. #[resonance_tester]
  63. #accel_chip: adxl345
  64. #probe_points:122,105,20
  65.  
  66. [input_shaper]
  67. #max_smoothing
  68.  
  69. [idle_timeout]
  70. timeout: 360
  71.  
  72. [display_status]
  73.  
  74. [virtual_sdcard]
  75. path: ~/gcode_files
  76.  
  77. [pause_resume]
  78.  
  79. #[output_pin LED_pin]
  80. #pin: rpi:21
  81. #value: 1
  82.  
  83. ########################################
  84. # EXTRUDER & BED configuration
  85. ########################################
  86.  
  87. [extruder]
  88. step_pin: PD6
  89. dir_pin: !PD3
  90. enable_pin: !PB3
  91. step_distance: .00230
  92. nozzle_diameter: 0.400
  93. filament_diameter: 1.750
  94. heater_pin: PC3
  95. sensor_type: ATC Semitec 104GT-2
  96. sensor_pin: PC1
  97. #control: pid
  98. #pid_Kp: 14.669
  99. #pid_Ki: 0.572
  100. #pid_Kd: 94.068
  101. min_temp: 0
  102. max_temp: 270
  103.  
  104. pressure_advance = 0.06
  105.  
  106. [fan]
  107. pin: PB1
  108. kick_start_time: 0.100
  109.  
  110. [heater_bed]
  111. heater_pin: PA0
  112. sensor_type: EPCOS 100K B57560G104F
  113. sensor_pin: PC0
  114. #control: pid
  115. #pid_Kp: 325.10
  116. #pid_Ki: 63.35
  117. #pid_Kd: 417.10
  118. min_temp: 0
  119. max_temp: 130
  120.  
  121.  
  122. [heater_fan my_nozzle_fan]
  123. pin: PB0
  124. heater: extruder
  125. heater_temp: 45.0
  126. fan_speed: 1.0
  127.  
  128.  
  129.  
  130. ########################################
  131. # MACRO configuration
  132. ########################################
  133.  
  134. [gcode_macro LEDOFF]
  135. gcode: SET_PIN PIN=LED_pin VALUE=0
  136.  
  137. [gcode_macro LEDON]
  138. gcode: SET_PIN PIN=LED_pin VALUE=1
  139.  
  140. [gcode_macro PAUSE]
  141. rename_existing: BASE_PAUSE
  142. default_parameter_E: 1.7
  143. gcode:
  144. {% set x_park = printer.toolhead.axis_minimum.x|float - 5.0 %}
  145. {% set y_park = printer.toolhead.axis_minimum.y|float - 5.0 %}
  146. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  147. {% set act_z = printer.toolhead.position.z|float %}
  148. {% if act_z < (max_z - 2.0) %}
  149. {% set z_safe = 2.0 %}
  150. {% else %}
  151. {% set z_safe = max_z - act_z %}
  152. {% endif %}
  153. SAVE_GCODE_STATE NAME=PAUSE_state
  154. BASE_PAUSE
  155. G91
  156. G1 E-{E} F2100
  157. G1 Z{z_safe} F900
  158. G90
  159. G0 X{x_park} Y{y_park} F6000
  160. G91
  161.  
  162. [gcode_macro RESUME]
  163. rename_existing: BASE_RESUME
  164. default_parameter_E: 1 # edit to your preferred retract length
  165. gcode:
  166. G91
  167. G1 E{E} F2100
  168. G90
  169. RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
  170. BASE_RESUME
  171.  
  172.  
  173. [gcode_macro CANCEL_PRINT]
  174. rename_existing: BASE_CANCEL_PRINT
  175. gcode:
  176. TURN_OFF_HEATERS
  177. CLEAR_PAUSE
  178. SDCARD_RESET_FILE
  179. BASE_CANCEL_PRINT
  180.  
  181.  
  182. [gcode_macro PAUSE]
  183. rename_existing: BASE_PAUSE
  184. default_parameter_X: 230 #edit to your park position
  185. default_parameter_Y: 230 #edit to your park position
  186. default_parameter_Z: 10 #edit to your park position
  187. default_parameter_E: 1 #edit to your retract length
  188. gcode:
  189. SAVE_GCODE_STATE NAME=PAUSE_state
  190. BASE_PAUSE
  191. G91
  192. G1 E-{E} F2100
  193. G1 Z{Z}
  194. G90
  195. G1 X{X} Y{Y} F6000
  196.  
  197.  
  198. [gcode_macro PA_OFF]
  199. default_parameter_J=0
  200. default_parameter_S=0.00
  201. gcode: SET_PRESSURE_ADVANCE ADVANCE={J} smooth_time={S}
  202.  
  203. [gcode_macro PA_ON]
  204. default_parameter_P= 0.16
  205. default_parameter_S= 0.08
  206. gcode: SET_PRESSURE_ADVANCE ADVANCE={P} smooth_time={S}
  207.  
  208.  
  209. [gcode_macro RESUME]
  210. rename_existing: BASE_RESUME
  211. default_parameter_E: 1 #edit to your retract length
  212. gcode:
  213. G91
  214. G1 E{E} F2100
  215. G90
  216. RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
  217. BASE_RESUME
  218.  
  219. [gcode_macro CANCEL_PRINT]
  220. rename_existing: BASE_CANCEL_PRINT
  221. gcode:
  222. TURN_OFF_HEATERS
  223. CLEAR_PAUSE
  224. SDCARD_RESET_FILE
  225. BASE_CANCEL_PRINT
  226.  
  227. [gcode_macro START_PRINT]
  228. default_parameter_BED_TEMP: 60
  229. default_parameter_EXTRUDER_TEMP: 205
  230. gcode:
  231. # Use absolute coordinates
  232. G90
  233. # Reset the G-Code Z offset (adjust Z offset if needed)
  234. SET_GCODE_OFFSET Z=-0.15 #-0.12
  235. # Home the printer
  236. G28
  237. # Load default bed mesh
  238. BED_MESH_PROFILE LOAD=default
  239. # Start bed heating
  240. M140 S{BED_TEMP}
  241. # Wait for bed to reach temperature
  242. M190 S{BED_TEMP}
  243. # Set and wait for nozzle to reach temperature
  244. M109 S{EXTRUDER_TEMP}
  245. #M104 S{material_print_temperature_layer_0} T0 ; heat nozzle
  246. #M190 S{material_bed_temperature_layer_0} T0 ; heat bed and wait
  247. #M109 S{material_print_temperature_layer_0} T0 ; wait for nozzle
  248. G1 X-50 Y-180 Z5 F2000
  249. G1 Z0.3
  250. #;Prime the extruder
  251. G92 E0
  252. G1 E15 F500
  253. G92 E0
  254. G1 X0.0 E10 F1000
  255. G1 X50 E14 F3200
  256. G92 E0
  257.  
  258. [gcode_macro END_PRINT]
  259. gcode:
  260. # Turn off bed, extruder, and fan
  261. M140 S0
  262. M104 S0
  263. M106 S0
  264. # Move nozzle away from print while retracting
  265. G28
  266. G91
  267. G1 E-10 F300
  268. # Raise nozzle by 10mm
  269. G90
  270. # Disable steppers
  271. #M84
  272.  
  273. #*# <---------------------- SAVE_CONFIG ---------------------->
  274. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  275. #*#
  276. #*# [extruder]
  277. #*# control = pid
  278. #*# pid_kp = 20.479
  279. #*# pid_ki = 0.922
  280. #*# pid_kd = 113.658
  281. #*#
  282. #*# [heater_bed]
  283. #*# control = pid
  284. #*# pid_kp = 63.597
  285. #*# pid_ki = 4.000
  286. #*# pid_kd = 252.796
  287. #*#
  288. #*# [input_shaper]
  289. #*# shaper_type_x = 2hump_ei
  290. #*# shaper_freq_x = 46.0
  291. #*# shaper_type_y = 2hump_ei
  292. #*# shaper_freq_y = 46.0
  293.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement