Guest User

Untitled

a guest
Mar 27th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.60 KB | None | 0 0
  1. [include mainsail.cfg]
  2. [include test_speed.cfg]
  3. [include Adaptive_Mesh.cfg]
  4. [include Adaptive_Purge.cfg]
  5. [include EBB36.cfg]
  6. #[include bedfans.cfg]
  7. #[include bedfans-dualcontrol.cfg]
  8. #[include PIS.cfg] ##uncomment for inputshaping
  9. [exclude_object]
  10. ##--------------------------------------------------------------------
  11. [mcu]
  12. canbus_uuid: 4b5ba85b0805
  13.  
  14. [mcu can0]
  15. canbus_uuid: 97b14605d5f5
  16.  
  17. [mcu rpi]
  18. serial: /tmp/klipper_host_mcu
  19.  
  20. ##--------------------------------------------------------------------
  21.  
  22.  
  23. [printer]
  24. kinematics: corexy
  25. max_velocity: 200
  26. max_accel: 4300 #Max 4000
  27. max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V
  28. max_z_accel: 350
  29. square_corner_velocity: 5.0
  30.  
  31. #####################################################################
  32. # X/Y Stepper Settings
  33. #####################################################################
  34.  
  35. ## B Stepper - Left
  36. ## Connected to MOTOR_0
  37. ## Endstop connected to DIAG_0
  38. [stepper_x]
  39. step_pin: PF13
  40. dir_pin: PF12
  41. enable_pin: !PF14
  42. rotation_distance: 40
  43. microsteps: 32
  44. full_steps_per_rotation:400 #200 for 1.8 degree stepper
  45. endstop_pin: ^can0:LIMIT_1 ##PG6
  46. position_min: 0
  47. position_endstop: 300
  48. position_max: 300
  49.  
  50. ##--------------------------------------------------------------------
  51. homing_speed: 100
  52. homing_retract_dist: 5
  53. homing_positive_dir: true
  54.  
  55.  
  56. [tmc5160 stepper_x]
  57. cs_pin: PC4
  58. interpolate: false
  59. #spi_bus: spi1
  60. run_current: 1.4 #0.8
  61. sense_resistor: 0.075
  62. stealthchop_threshold: 0
  63. #spi_software_sclk_pin: PA5
  64. #spi_software_miso_pin: PA6
  65. #spi_software_mosi_pin: PA7
  66. spi_software_miso_pin: EXP2_1
  67. spi_software_mosi_pin: EXP2_6
  68. spi_software_sclk_pin: EXP2_2
  69.  
  70. ## A Stepper - Right
  71. ## Connected to MOTOR_1
  72. ## Endstop connected to DIAG_1
  73. [stepper_y]
  74. step_pin: PG0
  75. dir_pin: PG1
  76. enable_pin: !PF15
  77. rotation_distance: 40
  78. microsteps: 32
  79. full_steps_per_rotation:400 #200 for 1.8 degree stepper
  80. endstop_pin: PG9
  81. position_min: 0
  82. position_endstop: 306.5
  83. position_max: 306.5
  84.  
  85. ##--------------------------------------------------------------------
  86. homing_speed: 100 #Max 100
  87. homing_retract_dist: 5
  88. homing_positive_dir: true
  89.  
  90. ## Make sure to update below for your relevant driver (2208 or 2209)
  91. [tmc5160 stepper_y]
  92. cs_pin: PD11
  93. #spi_software_sclk_pin: PA5
  94. #spi_software_miso_pin: PA6
  95. #spi_software_mosi_pin: PA7
  96. spi_software_miso_pin: EXP2_1
  97. spi_software_mosi_pin: EXP2_6
  98. spi_software_sclk_pin: EXP2_2
  99. #spi_bus: spi1
  100. interpolate: false
  101. run_current: 1.4 #0.8
  102. sense_resistor: 0.075
  103. stealthchop_threshold: 0
  104.  
  105. #####################################################################
  106. # Z Stepper Settings
  107. #####################################################################
  108.  
  109. ## Z0 Stepper - Front Left
  110. ## Connected to MOTOR_2
  111. ## Endstop connected to DIAG_2
  112. [stepper_z]
  113. step_pin: PF11
  114. dir_pin: PG3
  115. enable_pin: !PG5
  116. rotation_distance: 40
  117. gear_ratio: 80:16
  118. microsteps: 32
  119. endstop_pin: probe:z_virtual_endstop
  120. ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
  121. ##position_endstop: -0.5
  122. position_max: 275
  123. position_min: -5
  124. homing_speed: 8
  125. second_homing_speed: 3
  126. homing_retract_dist: 3
  127.  
  128. ## Make sure to update below for your relevant driver (2208 or 2209)
  129. [tmc2209 stepper_z]
  130. uart_pin: PC6
  131. interpolate: false
  132. run_current: 0.8
  133. sense_resistor: 0.110
  134. stealthchop_threshold: 999999
  135.  
  136. ## Z1 Stepper - Rear Left
  137. ## Connected to MOTOR_3
  138. [stepper_z1]
  139. step_pin: PG4
  140. dir_pin: !PC1
  141. enable_pin: !PA0
  142. rotation_distance: 40
  143. gear_ratio: 80:16
  144. microsteps: 32
  145.  
  146. ## Make sure to update below for your relevant driver (2208 or 2209)
  147. [tmc2209 stepper_z1]
  148. uart_pin: PC7
  149. interpolate: false
  150. run_current: 0.8
  151. sense_resistor: 0.110
  152. stealthchop_threshold: 999999
  153.  
  154. ## Z2 Stepper - Rear Right
  155. ## Connected to MOTOR_4
  156. [stepper_z2]
  157. step_pin: PF9
  158. dir_pin: PF10
  159. enable_pin: !PG2
  160. rotation_distance: 40
  161. gear_ratio: 80:16
  162. microsteps: 32
  163.  
  164. ## Make sure to update below for your relevant driver (2208 or 2209)
  165. [tmc2209 stepper_z2]
  166. uart_pin: PF2
  167. interpolate: false
  168. run_current: 0.8
  169. sense_resistor: 0.110
  170. stealthchop_threshold: 999999
  171.  
  172. ## Z3 Stepper - Front Right
  173. ## Connected to MOTOR_5
  174. [stepper_z3]
  175. step_pin: PC13
  176. dir_pin: !PF0
  177. enable_pin: !PF1
  178. rotation_distance: 40
  179. gear_ratio: 80:16
  180. microsteps: 32
  181.  
  182.  
  183. [tmc2209 stepper_z3]
  184. uart_pin: PE4
  185. interpolate: false
  186. run_current: 0.8
  187. sense_resistor: 0.110
  188. stealthchop_threshold: 999999
  189.  
  190.  
  191. #####################################################################
  192. # Extruder
  193. #####################################################################
  194.  
  195. ## REPLACED IN EBB36 DELETE ONCE RUNNING
  196. ## Heater - HE0
  197. ## Thermistor - T0
  198. #[#extruder]
  199. #can0:EXT_UART
  200. #step_pin: PE2
  201. #dir_pin: !PE3
  202. #enable_pin: !PD4
  203. ## Update value below when you perform extruder calibration
  204. ## If you ask for 100mm of filament, but in reality it is 98mm:
  205. ## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
  206. ## 22.6789511 is a good starting point
  207. #rotation_distance: 22.452161589 # 22.6789511 #Bondtech 5mm Drive Gears
  208. ## Use 50:10 for Stealthburner/Clockwork 2
  209. #gear_ratio: 50:10 #BMG Gear Ratio
  210. #microsteps: 32
  211. #full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
  212. #nozzle_diameter: 0.400
  213. #filament_diameter: 1.75
  214. #heater_pin: ##PA1
  215. #sensor_type: ##PT1000
  216. #sensor_pin: ##PF4
  217. #min_temp: 10
  218. #max_temp: 350
  219. #max_power: 1.0
  220. #min_extrude_temp: 170
  221. #max_extrude_only_distance: 900 #101
  222. #max_extrude_cross_section:50
  223. #control = pid
  224. #pid_kp = 26.213
  225. #pid_ki = 1.304
  226. #pid_kd = 131.721
  227. ## Try to keep pressure_advance below 1.0
  228. #pressure_advance: 0.031
  229. ## Default is 0.040, leave stock
  230. #pressure_advance_smooth_time: 0.040
  231.  
  232. ## E0 on MOTOR6
  233. #[tmc2209 extruder]
  234. #uart_pin: PE1
  235. #interpolate: false
  236. #run_current: 0.5
  237. #sense_resistor: 0.110
  238. #stealthchop_threshold: 0
  239.  
  240.  
  241. #####################################################################
  242. # Bed Heater
  243. #####################################################################
  244.  
  245.  
  246. ## SSR Pin - HE1
  247. ## Thermistor - TB
  248. [heater_bed]
  249. heater_pin: PA2
  250. sensor_type: Generic 3950
  251. sensor_pin: PF3
  252. ## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 .
  253. max_power: 0.6
  254. min_temp: 0
  255. max_temp: 140
  256. #control: pid
  257. #pid_kp: 58.437
  258. #pid_ki: 2.347
  259. #pid_kd: 363.769
  260.  
  261. #####################################################################
  262. # Probe
  263. #####################################################################
  264.  
  265. ## Voron Tap
  266. [probe]
  267. pin: ^can0:LIMIT_2
  268. x_offset: 0
  269. y_offset: 0
  270. #z_offset: 0
  271. speed: 10.0
  272. samples: 5
  273. samples_result: median
  274. sample_retract_dist: 3.0
  275. samples_tolerance: 0.006
  276. samples_tolerance_retries: 3
  277.  
  278. activate_gcode:
  279. {% set PROBE_TEMP = 150 %}
  280. {% set MAX_TEMP = PROBE_TEMP + 5 %}
  281. {% set ACTUAL_TEMP = printer.extruder.temperature %}
  282. {% set TARGET_TEMP = printer.extruder.target %}
  283.  
  284. {% if TARGET_TEMP > PROBE_TEMP %}
  285. { action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
  286. M109 S{ PROBE_TEMP }
  287. {% else %}
  288. # Temperature target is already low enough, but nozzle may still be too hot.
  289. {% if ACTUAL_TEMP > MAX_TEMP %}
  290. { action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
  291. TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
  292. {% endif %}
  293. {% endif %}
  294.  
  295.  
  296. #####################################################################
  297. # Fan Control
  298. #####################################################################
  299.  
  300. ## Print Cooling Fan - FAN0
  301. #see EBB36
  302. #[fan]
  303. #pin:
  304. #kick_start_time: 0.5
  305. #off_below: 0.10
  306. [fan]
  307. pin: rpi:gpio26
  308. max_power: 1.0
  309. cycle_time: 0.002
  310. shutdown_speed: 0
  311. hardware_pwm: false
  312.  
  313. ## Hotend Fan - FAN1
  314. #[heater_fan hotend_fan]
  315. #pin:
  316. #max_power: 1.0
  317. #kick_start_time: 0.5
  318. #heater: extruder
  319. #heater_temp: 50.0
  320. #fan_speed: 1.0
  321.  
  322. ## Controller fan - FAN0
  323. [controller_fan controller_fan]
  324. pin: PA8
  325. kick_start_time: 0.5
  326. heater: heater_bed
  327. fan_speed: 0.2
  328.  
  329. ## Controller fan - FAN0
  330. [controller_fan octoglasses]
  331. pin: PD13
  332. kick_start_time: 0.5
  333. heater: heater_bed
  334. fan_speed: 0.5
  335.  
  336. ## Exhaust fan - FAN3
  337. #[heater_fan nevermore]
  338. #pin: PD13
  339. #max_power: 1.0
  340. #shutdown_speed: 0.0
  341. #kick_start_time: 5.0
  342. #heater: heater_bed
  343. #heater_temp: 60
  344. #fan_speed: 1.0
  345.  
  346. [output_pin nevermore] #FAN1
  347. pin: PE5
  348. value: 0
  349. shutdown_value: 0
  350.  
  351. #####################################################################
  352. # LED Control
  353. #####################################################################
  354.  
  355. [output_pin caselight]
  356. ## Chamber Lighting - CNC_FAN3
  357. pin: PD14
  358. pwm:true
  359. shutdown_value: 0
  360. value:0
  361. cycle_time: 0.01
  362.  
  363. #####################################################################
  364. # Additional Sensors
  365. #####################################################################
  366. [temperature_sensor chamber]
  367. ## Chamber Temperature - T1
  368. sensor_type: Generic 3950
  369. sensor_pin: PF5
  370. min_temp: 0
  371. max_temp: 100
  372. gcode_id: chamber_th
  373.  
  374. [temperature_sensor mcu_temp]
  375. sensor_type: temperature_mcu
  376.  
  377. #####################################################################
  378. # Homing and Gantry Adjustment Routines
  379. #####################################################################
  380.  
  381. [idle_timeout]
  382. timeout: 18000
  383.  
  384. [safe_z_home]
  385. home_xy_position:150,150
  386. speed:100
  387. z_hop:10
  388. z_hop_speed:10
  389.  
  390.  
  391. [quad_gantry_level]
  392. gantry_corners:
  393. -60,-10
  394. 360,370
  395.  
  396. points:
  397. 10,10
  398. 10,290
  399. 290,290
  400. 290,10
  401.  
  402. speed: 100
  403. horizontal_move_z: 20
  404. retries: 5
  405. retry_tolerance: 0.0075
  406. max_adjust: 10
  407.  
  408. ## BED MESH ##
  409.  
  410. [bed_mesh]
  411. mesh_min: 10, 10
  412. mesh_max: 290,290
  413. horizontal_move_z: 7
  414. probe_count: 7,7
  415. algorithm: bicubic
  416. #mesh_pps: 2, 3
  417. #bicubic_tension: 0.2
  418. speed: 500
  419. #fade_start: 3
  420. #fade_end: 10
  421. #fade_target: 0
  422.  
  423.  
  424. ########################################
  425. # EXP1 / EXP2 (display) pins
  426. ########################################
  427.  
  428. [board_pins]
  429. aliases:
  430. # EXP1 header
  431. EXP1_1=PE8, EXP1_2=PE7,
  432. EXP1_3=PE9, EXP1_4=PE10,
  433. EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
  434. EXP1_7=PE14, EXP1_8=PE15,
  435. EXP1_9=<GND>, EXP1_10=<5V>,
  436.  
  437. # EXP2 header
  438. EXP2_1=PA6, EXP2_2=PA5,
  439. EXP2_3=PB1, EXP2_4=PA4,
  440. EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
  441. EXP2_7=PC15, EXP2_8=<RST>,
  442. EXP2_9=<GND>, EXP2_10=<5V>
  443.  
  444. #####################################################################
  445. # Displays
  446. #####################################################################
  447.  
  448. [display]
  449. # mini12864 LCD Display
  450. lcd_type: uc1701
  451. cs_pin: EXP1_3
  452. a0_pin: EXP1_4
  453. rst_pin: EXP1_5
  454. encoder_pins: ^EXP2_5, ^EXP2_3
  455. click_pin: ^!EXP1_2
  456. contrast: 63
  457. spi_software_miso_pin: EXP2_1
  458. spi_software_mosi_pin: EXP2_6
  459. spi_software_sclk_pin: EXP2_2
  460.  
  461. [neopixel btt_mini12864]
  462. pin: EXP1_6
  463. chain_count: 3
  464. initial_RED: 0.1
  465. initial_GREEN: 0.5
  466. initial_BLUE: 0.0
  467. color_order: RGB
  468.  
  469. ## Set RGB values on boot up for each Neopixel.
  470. ## Index 1 = display, Index 2 and 3 = Knob
  471. [delayed_gcode setdisplayneopixel]
  472. initial_duration: 1
  473. gcode:
  474. SET_LED LED=btt_mini12864 RED=0.4784 GREEN=0.3608 BLUE=1 INDEX=1 TRANSMIT=0
  475. SET_LED LED=btt_mini12864 RED=0.4784 GREEN=0.3608 BLUE=1 INDEX=2 TRANSMIT=0
  476. SET_LED LED=btt_mini12864 RED=0.4784 GREEN=0.3608 BLUE=1 INDEX=3
  477. #--------------------------------------------------------------------
  478.  
  479. [neopixel LIGHTSHOW]
  480. pin: PB0
  481. chain_count: 18
  482. color_order: GRB
  483. # Set the pixel order required by the LED hardware. Options are GRB,
  484. # RGB, GRBW, or RGBW. The default is GRB.
  485. initial_RED: 1.0
  486. initial_GREEN: 0.0
  487. initial_BLUE: 1.0
  488. initial_WHITE: 0.0
  489.  
  490.  
  491. #####################################################################
  492. # Macros
  493. #####################################################################
  494.  
  495. [gcode_macro G32]
  496. gcode:
  497. status_leveling
  498. SAVE_GCODE_STATE NAME=STATE_G32
  499. G90
  500. G28
  501. QUAD_GANTRY_LEVEL
  502. G28
  503.  
  504. G0 X150 Y150 Z30 F3600
  505.  
  506. #--------------------------------------------------------------------
  507. RESTORE_GCODE_STATE NAME=STATE_G32
  508.  
  509. ###STOCK PRINT START
  510. # Use PRINT_START for the slicer starting script - please customise for your slicer of choice
  511. #[gcode_macro PRINT_START]
  512. #gcode:
  513. #STATUS_PRINTING
  514. # G32 ; home all axes
  515. # G90 ; absolute positioning
  516. # G1 Z20 F3000 ; move nozzle away from bed
  517. ##Tap print start
  518. [gcode_macro _PRIME_NOZZLE]
  519. gcode:
  520. SAVE_GCODE_STATE NAME=PRIME_NOZZLE_STATE
  521. M117 Priming
  522. G90 ; Absolute coordinates.
  523. M83 ; Relative extruder mode.
  524. G92 E0
  525. ; Move to start of line.
  526. G1 Z10 F900
  527. G1 Y3 X3 F18000
  528. G1 Z0.2 F900
  529. ; Print the line.
  530. G91 ; Relative coordinates.
  531. G1 X100 E25 F1000 ; Extrude filament 25mm (how much it retracted in PRINT_END).
  532. G1 Y-2 F1000
  533. G1 X-60 E9 F1000 ; Print second part of the line.
  534. G1 E-0.5 F3000 ; Retract to avoid stringing.
  535. G1 X0.5 E0 F1000 ; Wipe back to break string.
  536. G1 X-5.5 E0 F1000 ; Wipe forward to break string.
  537. RESTORE_GCODE_STATE NAME=PRIME_NOZZLE_STATE
  538.  
  539. [gcode_macro PRINT_START]
  540. # Use PRINT_START for the slicer starting script - please customise for your slicer of choice
  541. gcode:
  542.  
  543. SET_PIN PIN=nevermore VALUE=1 # Turns on the nevermore
  544. M117 Heating bed
  545. M190 S{ params.BED } ; Wait for bed to get to target temperature.
  546. {% set target_chamber = params.CHAMBER|default("40")|int %}
  547. M117 Preheating nozzle
  548. M109 S150 ; Wait for nozzle to heat to 150C - soften filament, but no oozing.
  549.  
  550. M107 ; Print fan off
  551. STATUS_HOMING # Sets SB-leds to homing-mode
  552. G28 ; Home - G28 or G32 depending on printer.
  553.  
  554. SET_DISPLAY_TEXT MSG="QGL" # Displays info
  555. STATUS_LEVELING # Sets SB-leds to leveling-mode
  556. QUAD_GANTRY_LEVEL ; Trident uses Z_TILT_ADJUST, V2 uses QUAD_GANTRY_LEVEL
  557. G28 Z
  558. STATUS_MESHING
  559.  
  560. BED_MESH_CLEAR # Clears old saved bed mesh (if any)
  561.  
  562.  
  563. {% if 'bed_mesh' in printer.configfile.config %}
  564. BED_MESH_CALIBRATE
  565. {% endif %}
  566.  
  567. M117 Heating nozzle
  568. STATUS_HEATING # Sets SB-leds to heating-mode
  569. M109 S{ params.EXTRUDER } ; Wait for nozzle to get to target temperature.
  570.  
  571. #_PRIME_NOZZLE ##removed for adaptive purge
  572. ADAPTIVE_PURGE
  573.  
  574. G90 ; Absolute coordinates.
  575. M83 ; Relative extruder mode.
  576. G92 E0
  577.  
  578. # Gets ready to print by doing a purge line and updating the SB-leds
  579. SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info
  580. STATUS_PRINTING # Sets SB-leds to printing-mode
  581.  
  582. #M117 Printing
  583.  
  584. ###"IMPROVED PRINT START"###
  585.  
  586. ## *** THINGS TO UNCOMMENT: ***
  587. ## Bed mesh (2 lines at 2 locations)
  588. ## Screw_tilt_adjust if your printer is a Trident
  589. ## Quad gantry level if your printer is a V2
  590. ## Nevermore - if you have one
  591.  
  592. #[gcode_macro PRINT_START]
  593. #gcode:
  594. # This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer.
  595. #{% set target_bed = params.bed|int %}
  596. #M117 Preheating nozzle
  597. # M109 S150 ; Wait for nozzle to heat to 150C - soften filament, but no oozing.
  598. #{% set target_extruder = params.EXTRUDER|int %}
  599.  
  600. # {% set target_chamber = params.CHAMBER|default("40")|int %}
  601. # {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
  602. # {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}
  603.  
  604. # Homes the printer, sets absolute positioning and updates the Stealthburner leds.
  605. #STATUS_HOMING # Sets SB-leds to homing-mode
  606. #G28 # Full home (XYZ)
  607. #G90 # Absolut position
  608.  
  609. ## Uncomment for bed mesh (1 of 2)
  610. # BED_MESH_CLEAR # Clears old saved bed mesh (if any)
  611.  
  612. # Checks if the bed temp is higher than 90c - if so then trigger a heatsoak.
  613. #{% if params.BED|int > 90 %}
  614. # SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
  615. # STATUS_HEATING # Sets SB-leds to heating-mode
  616. # M106 S255 # Turns on the PT-fan
  617.  
  618. ## Uncomment if you have a Nevermore.
  619. # SET_PIN PIN=nevermore VALUE=1 # Turns on the nevermore
  620.  
  621. # G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
  622. #M190 S{target_bed} # Sets the target temp for the bed
  623. #SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info
  624. #TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber} # Waits for chamber to reach desired temp
  625.  
  626. # If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak
  627. #{% else %}
  628. # SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info
  629. # STATUS_HEATING # Sets SB-leds to heating-mode
  630. # G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
  631. # M190 S{target_bed} # Sets the target temp for the bed
  632. # SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info
  633. #G4 P300000 # Waits 5 min for the bedtemp to stabilize
  634. #{% endif %}
  635.  
  636. # Heating nozzle to 150 degrees. This helps with getting a correct Z-home
  637. #SET_DISPLAY_TEXT MSG="Hotend: 150c" # Displays info
  638. #M109 S150 # Heats the nozzle to 150c
  639.  
  640. ## Uncomment for V2 (Quad gantry level AKA QGL)
  641. # SET_DISPLAY_TEXT MSG="QGL" # Displays info
  642. # STATUS_LEVELING # Sets SB-leds to leveling-mode
  643. # quad_gantry_level # Levels the buildplate via QGL
  644. # G28 Z # Homes Z again after QGL
  645.  
  646. ## Uncomment for Klicky auto-z
  647. #CALIBRATE_Z # Calibrates Z-offset with klicky
  648. #SET_DISPLAY_TEXT MSG="Z-offset" # Displays info
  649.  
  650. ## Uncomment for bed mesh (2 of 2)
  651. # SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info
  652. # STATUS_MESHING # Sets SB-leds to bed mesh-mode
  653. # bed_mesh_calibrate # Starts bed mesh
  654.  
  655. # Heats up the nozzle up to target via data from slicer
  656. # SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info
  657. # STATUS_HEATING # Sets SB-leds to heating-mode
  658. # G1 X{x_wait} Y{y_wait} Z15 F9000 # Goes to center of the bed
  659. # M107 # Turns off partcooling fan
  660. # M109 S{target_extruder} # Heats the nozzle to printing temp
  661.  
  662. # Gets ready to print by doing a purge line and updating the SB-leds
  663. # SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info
  664. # STATUS_PRINTING # Sets SB-leds to printing-mode
  665. # G0 X{x_wait - 50} Y4 F10000 # Moves to starting point
  666. # G0 Z0.4 # Raises Z to 0.4
  667. # G91 # Incremental positioning
  668. # G1 X100 E20 F1000 # Purge line
  669. # G90 # Absolut position
  670.  
  671. # Use PRINT_END for the slicer ending script - please customise for your slicer of choice
  672. [gcode_macro PRINT_END]
  673. gcode:
  674.  
  675. # safe anti-stringing move coords
  676. {% set th = printer.toolhead %}
  677. {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
  678. {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
  679. {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
  680.  
  681. SAVE_GCODE_STATE NAME=STATE_PRINT_END
  682.  
  683. M400 ; wait for buffer to clear
  684. G92 E0 ; zero the extruder
  685. G1 E-5.0 F1800 ; retract filament
  686.  
  687. TURN_OFF_HEATERS
  688.  
  689. G90 ; absolute positioning
  690. G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
  691. G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
  692. G91
  693. G0 Z10
  694. G90
  695. M107 ; turn off fan
  696. STATUS_READY
  697. BED_MESH_CLEAR
  698. RESTORE_GCODE_STATE NAME=STATE_PRINT_END
  699. SET_PIN PIN=nevermore VALUE=1 =180
  700.  
  701. ##
  702. [gcode_macro G28]
  703. description: G28 homing with SB LED status
  704. rename_existing: G2828
  705. gcode:
  706. STATUS_HOMING
  707. G2828 { rawparams }
  708. STATUS_READY
  709.  
  710.  
  711. [gcode_macro UPDATE_IDLE_TIMEOUT]
  712. description: Send `UPDATE_IDLE_TIMEOUT [H=<value>] [M=<value>] [S=<value>] ` to set the Hours, Minutes, and Seconds for Idle_Timout. Passing no paramaters will return it to the config default value.
  713. gcode:
  714. {% set Hours = params.H|default(0)|int %}
  715. {% set Minutes = params.M|default(0)|int %}
  716. {% set Seconds = params.S|default(0)|int %}
  717. {% set DEFAULT = printer.configfile.settings.idle_timeout.timeout|int %}
  718.  
  719. {% set TIME = ((Hours*3600) + (Minutes*60) + (Seconds))|int %}
  720.  
  721. {% if TIME == 0 %} # No time was entered
  722. {% set TIME = DEFAULT %}
  723. {% endif %}
  724. set_idle_timeout timeout={TIME|int}
  725.  
  726.  
  727. # BBL arc command
  728. [gcode_arcs]
  729. resolution: 0.1
  730.  
  731. [gcode_macro m201]
  732. gcode:
  733. {% if 'X' in params or 'Y' in params %}
  734. {% set accel = (params.X|default(params.Y)|float,
  735. params.Y|default(params.X)|float)|min %}
  736. SET_VELOCITY_LIMIT ACCEL={accel} ACCEL_TO_DECEL={accel * 0.5}
  737. {% else %}
  738. SET_VELOCITY_LIMIT
  739. {% endif %}
  740.  
  741. [gcode_macro m203]
  742. gcode:
  743. {% if 'X' in params or 'Y' in params %}
  744. {% set speed = (params.X|default(params.Y)|float,
  745. params.Y|default(params.X)|float)|min %}
  746. SET_VELOCITY_LIMIT VELOCITY={speed}
  747. {% else %}
  748. SET_VELOCITY_LIMIT
  749. {% endif %}
  750.  
  751. [gcode_macro M205]
  752. gcode:
  753. {% if 'X' in params or 'Y' in params %}
  754. {% set corner_speed = (params.X|default(params.Y)|float,
  755. params.Y|default(params.X)|float)|min %}
  756. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={corner_speed}
  757. {% else %}
  758. SET_VELOCITY_LIMIT
  759. {% endif %}
  760.  
  761. [gcode_macro M900]
  762. gcode:
  763. SET_PRESSURE_ADVANCE ADVANCE={params.K}
  764.  
  765. #*# <---------------------- SAVE_CONFIG ---------------------->
  766. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  767. #*#
  768. #*# [heater_bed]
  769. #*# control = pid
  770. #*# pid_kp = 37.117
  771. #*# pid_ki = 1.243
  772. #*# pid_kd = 276.984
  773. #*#
  774. #*# [extruder]
  775. #*# control = pid
  776. #*# pid_kp = 23.685
  777. #*# pid_ki = 2.163
  778. #*# pid_kd = 64.837
  779. #*#
  780. #*# [probe]
  781. #*# z_offset = -0.705
  782. #*#
  783. #*# [input_shaper]
  784. #*# shaper_type_x = mzv
  785. #*# shaper_freq_x = 52.8
  786. #*# shaper_type_y = 2hump_ei
  787. #*# shaper_freq_y = 68.8
  788. #*#
  789. #*# [bed_mesh Textured heatsoaked]
  790. #*# version = 1
  791. #*# points =
  792. #*# 0.032589, 0.030089, 0.025089, 0.040089, 0.033839, 0.063839, 0.052589, 0.053839, 0.020089
  793. #*# 0.026339, 0.030089, 0.025089, 0.025089, -0.021161, -0.017411, 0.023839, -0.016161, 0.026339
  794. #*# 0.002589, 0.003839, 0.013839, -0.011161, -0.027411, 0.002589, -0.013661, -0.031161, 0.012589
  795. #*# -0.001161, 0.001339, 0.033839, 0.002589, -0.002411, -0.021161, -0.019911, 0.012589, -0.011161
  796. #*# 0.010089, 0.048839, 0.000089, -0.026161, -0.023661, -0.054911, -0.021161, -0.009911, -0.031161
  797. #*# 0.042589, 0.027589, 0.023839, -0.006161, -0.026161, -0.019911, -0.034911, -0.033661, -0.042411
  798. #*# 0.060089, 0.063839, 0.036339, 0.021339, -0.029911, -0.014911, -0.004911, -0.034911, -0.007411
  799. #*# 0.036339, 0.032589, 0.025089, 0.006339, 0.001339, -0.024911, 0.003839, 0.000089, 0.000089
  800. #*# 0.040089, 0.022589, 0.021339, 0.011339, -0.011161, -0.042411, 0.001339, 0.008839, 0.021339
  801. #*# x_count = 9
  802. #*# y_count = 9
  803. #*# mesh_x_pps = 2
  804. #*# mesh_y_pps = 2
  805. #*# algo = bicubic
  806. #*# tension = 0.2
  807. #*# min_x = 10.0
  808. #*# max_x = 290.0
  809. #*# min_y = 10.0
  810. #*# max_y = 290.0
  811. #*#
  812. #*# [bed_mesh default]
  813. #*# version = 1
  814. #*# points =
  815. #*# 0.055000, 0.032500, 0.058750, 0.085000, 0.057500
  816. #*# 0.033750, -0.002500, -0.022500, -0.006250, 0.010000
  817. #*# 0.027500, 0.001250, -0.016250, 0.012500, 0.042500
  818. #*# 0.061250, 0.020000, -0.008750, 0.068750, 0.035000
  819. #*# 0.068750, 0.033750, 0.041250, 0.078750, 0.045000
  820. #*# x_count = 5
  821. #*# y_count = 5
  822. #*# mesh_x_pps = 2
  823. #*# mesh_y_pps = 2
  824. #*# algo = bicubic
  825. #*# tension = 0.2
  826. #*# min_x = 10.0
  827. #*# max_x = 290.0
  828. #*# min_y = 10.0
  829. #*# max_y = 290.0
  830.  
Advertisement
Add Comment
Please, Sign In to add comment