Advertisement
Guest User

printer.cfg Neptune 4 Max 3D Chameleon

a guest
Aug 16th, 2024
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.33 KB | None | 0 0
  1. # This file contains common pin mappings for ELEGOO
  2. # boards. To use this config, the firmware should be compiled for the
  3. # stm32f407. When running "make menuconfig", select the 48KiB
  4. # bootloader, and enable "Serial for communication" and select the "on USART1 PA10/PA9"
  5. # See docs/Config_Reference.md for a description of parameters.
  6.  
  7.  
  8. ####################################################################
  9. # Printer Type and Speed/Accel Parameters
  10. #####################################################################
  11.  
  12. [printer]
  13. kinematics:cartesian
  14. max_velocity: 500
  15. max_accel: 5000
  16. #max_x_velocity: 500
  17. #max_x_accel: 4000
  18. #max_y_velocity: 500
  19. #max_y_accel: 4000
  20. max_z_velocity: 20
  21. max_z_accel: 300
  22. square_corner_velocity: 5.0
  23.  
  24. ####################################################################
  25. # Main MCU
  26. #####################################################################
  27.  
  28. [mcu]
  29. # The hardware use USART1 PA10/PA9 connect to RK3328
  30. serial: /dev/ttyS0
  31. restart_method: command
  32.  
  33. ####################################################################
  34. # Pi MCU and Accelerometers
  35. #####################################################################
  36.  
  37. [mcu rpi]
  38. serial: /tmp/klipper_host_mcu
  39.  
  40. [adxl345 x]
  41. cs_pin: rpi:None
  42. spi_bus: spidev0.0
  43. axes_map:x,z,-y
  44.  
  45. [adxl345 y]
  46. cs_pin: rpi:None
  47. spi_bus: spidev0.1
  48. axes_map:-x,-y,-z
  49.  
  50. [resonance_tester]
  51. accel_chip_x: adxl345 x
  52. accel_chip_y: adxl345 y
  53. probe_points:
  54. 215, 215, 20 # an example
  55.  
  56. [input_shaper]
  57. #shaper_type_x = zv
  58. #shaper_freq_x = 116.2
  59. shaper_type_y = zv
  60. shaper_freq_y = 38.8
  61.  
  62. ####################################################################
  63. # Stepper Motors and Drivers
  64. #####################################################################
  65.  
  66. [stepper_x]
  67. step_pin:PC14
  68. dir_pin:PC13
  69. enable_pin:!PC15
  70. #microsteps: 16
  71. microsteps: 64
  72. rotation_distance: 40
  73. full_steps_per_rotation:200
  74. #endstop_pin:PC0
  75. endstop_pin:tmc2209_stepper_x:virtual_endstop
  76. position_min: 0
  77. position_endstop: 0
  78. position_max: 430
  79. homing_speed:80
  80. homing_retract_dist:0
  81. homing_positive_dir:false
  82. step_pulse_duration:0.000002
  83.  
  84. [stepper_y]
  85. step_pin:PB4
  86. dir_pin:PB3
  87. enable_pin:!PC15
  88. #microsteps:16
  89. microsteps:64
  90. rotation_distance: 40
  91. full_steps_per_rotation:200
  92. #endstop_pin:PB8
  93. endstop_pin:tmc2209_stepper_y:virtual_endstop
  94. position_min: -1
  95. position_endstop:-1
  96. position_max:430
  97. homing_speed:80
  98. homing_retract_dist:0
  99. homing_positive_dir:false
  100. step_pulse_duration:0.000002
  101.  
  102. [stepper_z]
  103. step_pin:PC10
  104. dir_pin:!PA13
  105. enable_pin: !PC11
  106. microsteps: 16
  107. rotation_distance: 8
  108. full_steps_per_rotation: 200
  109. endstop_pin:probe:z_virtual_endstop ## PB12 for Z-max; endstop have'!' is NO
  110.  
  111. ## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
  112. ## (+) value = endstop above Z0, (-) value = endstop below
  113. ## Increasing position_endstop brings nozzle closer to the bed
  114. ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
  115. #position_endstop:-5
  116. position_max: 505
  117. position_min: -5
  118. homing_speed: 8
  119. second_homing_speed: 5
  120.  
  121. ####################################################################
  122. # Hotend & Extruder
  123. #####################################################################
  124.  
  125. [extruder]
  126. step_pin:PA5
  127. dir_pin:!PA6
  128. enable_pin:!PA4
  129. microsteps:16
  130. rotation_distance: 31.4 #Bondtech 5mm Drive Gears
  131. gear_ratio: 52:10
  132. full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
  133. nozzle_diameter: 0.400
  134. filament_diameter: 1.750
  135. min_temp: 0
  136. max_temp: 330
  137. heater_pin: PA7
  138. sensor_type:NTC 100K MGB18-104F39050L32
  139. sensor_pin: PA1
  140. max_power: 1
  141. control = pid
  142. pid_kp = 35.144
  143. pid_ki = 9.762
  144. pid_kd = 31.630
  145. pressure_advance: 0.022
  146. pressure_advance_smooth_time: 0.04
  147. max_extrude_cross_section:500
  148. instantaneous_corner_velocity: 10.000
  149. max_extrude_only_distance: 150
  150. max_extrude_only_velocity:5000
  151. max_extrude_only_accel:2000
  152. step_pulse_duration:0.000002
  153. max_extrude_cross_section: 10
  154. min_extrude_temp:0
  155.  
  156. [verify_heater extruder]
  157. max_error: 120
  158. check_gain_time:120
  159. hysteresis: 10
  160. heating_gain: 2
  161.  
  162. ########################################
  163. # TMC UART configuration
  164. ########################################
  165.  
  166. [tmc2209 stepper_x]
  167. uart_pin: PB9
  168. run_current: 1.0
  169. hold_current: 0.8
  170. #interpolate: True
  171. stealthchop_threshold:99999
  172. driver_SGTHRS:90
  173. diag_pin:^PC0
  174.  
  175. [tmc2209 stepper_y]
  176. uart_pin: PD2
  177. run_current: 1.2
  178. hold_current: 1.0
  179. #interpolate: True
  180. stealthchop_threshold:99999
  181. driver_SGTHRS:110
  182. diag_pin:^PB8
  183.  
  184. [tmc2209 stepper_z]
  185. uart_pin: PC5
  186. run_current: 0.8
  187. hold_current: 0.8
  188. interpolate: True
  189. stealthchop_threshold: 120
  190.  
  191. [tmc2209 extruder]
  192. uart_pin: PC4
  193. run_current: 0.9
  194. hold_current: 0.5
  195. interpolate: True
  196. stealthchop_threshold: 400
  197.  
  198. ####################################################################
  199. # Heated Bed
  200. #####################################################################
  201.  
  202. [heater_bed]
  203. heater_pin:PB10
  204. sensor_type: NTC 100K MGB18-104F39050L32
  205. sensor_pin: PA0
  206. max_power: 1.0
  207. #control = watermark
  208. control = pid
  209. pid_kp = 75.397
  210. pid_ki = 0.823
  211. pid_kd = 1727.531
  212. min_temp: 0
  213. max_temp: 100
  214.  
  215. [verify_heater heater_bed]
  216. max_error: 120
  217. #check_gain_time:120
  218. check_gain_time:360
  219. hysteresis: 10
  220. heating_gain: 2
  221.  
  222. ####################################################################
  223. # Fans
  224. #####################################################################
  225.  
  226. [heater_fan fan1]
  227. pin: PC7
  228. shutdown_speed: 1
  229.  
  230. #fan for printed model FAN2
  231. [fan]
  232. pin: PB7
  233.  
  234. [fan_generic fan3]
  235. pin: PC9
  236.  
  237. [fan_generic fan4]
  238. pin: PA8
  239.  
  240. [fan_generic fan5]
  241. pin: PA15
  242.  
  243. #####################################################################
  244. # Probe
  245. #####################################################################
  246.  
  247. [probe]
  248. pin:^PA11
  249. x_offset: -24.25
  250. y_offset: 20.45
  251. #z_offset: 0.0
  252. speed: 10.0
  253. samples: 3
  254. samples_result: median
  255. sample_retract_dist: 3.0
  256. samples_tolerance: 0.05 #1.0
  257. samples_tolerance_retries: 1
  258.  
  259. ####################################################################
  260. # Bed Meshing
  261. #####################################################################
  262.  
  263. [bed_mesh]
  264. speed:120
  265. horizontal_move_z:10
  266. mesh_min:10,21
  267. mesh_max:397,404
  268. probe_count:11,11
  269. algorithm:bicubic
  270. bicubic_tension:0.2
  271. mesh_pps: 4, 4
  272. fade_start:1.0
  273. fade_end:30.0
  274.  
  275. #####################################################################
  276. # LED Control
  277. #####################################################################
  278.  
  279. [gcode_macro LED_FRAME_ON]
  280. description: Turn on the Frame LEDs
  281. gcode:
  282. SET_PIN PIN=caselight1 VALUE=1
  283.  
  284. [gcode_macro LED_FRAME_OFF]
  285. description: Turn off the Frame LEDs
  286. gcode:
  287. SET_PIN PIN=caselight1 VALUE=0
  288.  
  289. [gcode_macro LED_NOZZLE_ON]
  290. description: Turn on the Nozzle LED
  291. gcode:
  292. SET_PIN PIN=caselight VALUE=1
  293.  
  294. [gcode_macro LED_NOZZLE_OFF]
  295. description: Turn off the Nozzle LED
  296. gcode:
  297. SET_PIN PIN=caselight VALUE=0
  298.  
  299. #####################################################################
  300. # Filament Sensor
  301. #####################################################################
  302.  
  303. [filament_switch_sensor fila]
  304. pause_on_runout: True
  305. runout_gcode:
  306. SET_FILAMENT_SENSOR SENSOR=fila ENABLE=1
  307. event_delay: 3.0
  308. pause_delay: 0.5
  309. switch_pin: PA12
  310.  
  311. ####################################################################
  312. # Miscellaneous
  313. #####################################################################
  314.  
  315. [force_move]
  316. enable_force_move : true
  317.  
  318. [virtual_sdcard]
  319. path: ~/printer_data/gcodes
  320.  
  321. [display_status]
  322.  
  323. [gcode_arcs]
  324.  
  325. [idle_timeout]
  326. timeout: 36000
  327.  
  328. #####################################################################
  329. # Homing system
  330. ####################################################################
  331.  
  332. [homing_override]
  333. gcode:
  334. {% if params.X is defined %}
  335. {% if params.Y is undefined %}
  336. {% if params.Z is undefined %}
  337. _HOME_X
  338. {% endif %}
  339. {% endif %}
  340. {% endif %}
  341. {% if params.Y is defined %}
  342. {% if params.X is undefined %}
  343. {% if params.Z is undefined %}
  344. _HOME_Y
  345. {% endif %}
  346. {% endif %}
  347. {% endif %}
  348. {% if params.Z is defined %}
  349. {% if params.X is undefined %}
  350. {% if params.Y is undefined %}
  351. G91
  352. G1 Z10 F500
  353. _HOME_X
  354. _HOME_Y
  355. G90
  356. G1 X215 Y215 F5000
  357. G28 Z F500
  358. {% endif %}
  359. {% endif %}
  360. {% endif %}
  361. {% if params.X is defined %}
  362. {% if params.Y is defined %}
  363. {% if params.Z is undefined %}
  364. _HOME_X
  365. _HOME_Y
  366. {% endif %}
  367. {% endif %}
  368. {% endif %}
  369. {% if params.X is undefined %}
  370. {% if params.Y is undefined %}
  371. {% if params.Z is undefined %}
  372. G91
  373. G1 Z10 F500
  374. _HOME_X
  375. _HOME_Y
  376. G90
  377. G1 X215 Y215 F5000
  378. G28 Z F500
  379. {% endif %}
  380. {% endif %}
  381. {% endif %}
  382.  
  383. [gcode_macro _HOME_X]
  384. gcode:
  385. # Always use consistent run_current on A/B steppers during sensorless homing
  386. # {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
  387. # {% set RUN_ACCEL = printer.configfile.settings['printer'].max_accel|float %}
  388. # {% set HOME_CURRENT = 0.8 %}
  389. # {% set HOME_ACCEL = 2000.0 %}
  390.  
  391. # SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
  392. # SET_VELOCITY_LIMIT ACCEL={HOME_ACCEL}
  393.  
  394. # Home
  395. G28 X
  396.  
  397. #Move away
  398. #G91
  399. #G1 X5 F1200
  400.  
  401. # Wait just a second… (give StallGuard registers time to clear)
  402. # G4 P1000
  403.  
  404. # Set current during print
  405. # SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
  406. # SET_VELOCITY_LIMIT ACCEL={RUN_ACCEL}
  407.  
  408. # G90
  409.  
  410. [gcode_macro _HOME_Y]
  411. gcode:
  412. # Set current for sensorless homing
  413. # {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
  414. # {% set RUN_ACCEL = printer.configfile.settings['printer'].max_accel|float %}
  415. # {% set HOME_CURRENT = 0.8 %}
  416. # {% set HOME_ACCEL = 60.0 %}
  417.  
  418. # SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
  419. # SET_VELOCITY_LIMIT ACCEL={HOME_ACCEL}
  420.  
  421. # Home
  422. G28 Y
  423. G28 Y
  424.  
  425. #Move away
  426. #G91
  427. #G1 Y20 F1200
  428.  
  429. # Wait just a second… (give StallGuard registers time to clear)
  430. # G4 P1000
  431. # Set current during print
  432. # SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
  433. # SET_VELOCITY_LIMIT ACCEL={RUN_ACCEL}
  434.  
  435. # G90
  436.  
  437.  
  438. #[safe_z_home] # An alternate Homing setup
  439. #home_xy_position: 215,215
  440. #speed: 100
  441. #z_hop: 10
  442. #z_hop_speed: 5
  443.  
  444. ####################################################################
  445. # Macros
  446. #####################################################################
  447.  
  448. [gcode_macro START_PRINT]
  449. gcode:
  450. {% if params.HOTEND_TEMP is defined %}
  451. {% if params.BED_TEMP is defined %}
  452. {% set HOTEND_TEMP = params.HOTEND_TEMP|default(190)|float %}
  453. {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  454. M140 S{BED_TEMP} ; Heat the Bed - without waiting
  455. M104 S{HOTEND_TEMP} ; Heat the Hotend - without waiting
  456. {% endif %}
  457. {% endif %}
  458. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}
  459. #LEDS_FRAME_ON
  460. RESPOND TYPE=error MSG='Beginning START_PRINT'
  461. G4 P2000
  462. RESPOND TYPE=error MSG='Home All Axis'
  463. G4 P2000
  464. G90 # use absolute coordinates
  465. #{% if printer.toolhead.homed_axes != "xyz" %}
  466. #{action_raise_error("Homing the XYZ Axis")}
  467. G28 # Home All Axis
  468. #{% endif %}
  469. G1 Z10 F240 # Lift the printhead to Z=10
  470. G1 X-7 F7200 # Move off the left edge of the Bed ready to purge
  471. RESPOND TYPE=error MSG='All Axis are Homed !!!'
  472. G4 P2000
  473. RESPOND TYPE=error MSG='Loading the 60degC Bed Mesh (BED60)'
  474. G4 P2000
  475. BED_MESH_CLEAR
  476. BED_MESH_PROFILE LOAD=BED60
  477. RESPOND TYPE=error MSG='BED60 Bed Mesh loaded'
  478. G4 P2000
  479. CLEAR_PAUSE
  480. {% if params.HOTEND_TEMP is defined %}
  481. {% if params.BED_TEMP is defined %}
  482. RESPOND TYPE=error MSG='Waiting for the Hotend and Bed Temps'
  483. G4 P2000
  484. M109 S{HOTEND_TEMP} # Heat the Hotend - wait for temp
  485. M190 S{BED_TEMP} # Heat the Bed - wait for temp
  486. {% endif %}
  487. {% endif %}
  488. RESPOND TYPE=error MSG='The Hotend and Bed Temps are ready!!!'
  489. RESPOND TYPE=error MSG='Purging/Priming the nozzle, then....'
  490. G4 P2000
  491. M83 # Extruder to Relative mode
  492. G1 E30 F240 # Extrude 30mm of filament
  493. G92 E0 # Reset the Extruder to 0
  494. #LED_NOZZLE_ON
  495. RESPOND TYPE=error MSG='LETS PRINT !!!'
  496. G4 P2000
  497. #RESPOND TYPE=error MSG='Heading to the Purge_Wipe Macro'
  498. #G4 P2000
  499. #PURGE_WIPE
  500. M117
  501.  
  502. [gcode_macro PRINT_START]
  503. gcode:
  504.  
  505. [gcode_macro END_PRINT]
  506. gcode:
  507. RUN_SHELL_COMMAND CMD=clear_plr
  508. clear_last_file
  509. {% set RUN_VELOCITY = printer.configfile.settings['printer'].max_velocity|float %}
  510. {% set RUN_ACCEL = printer.configfile.settings['printer'].max_accel|float %}
  511. SET_VELOCITY_LIMIT VELOCITY={RUN_VELOCITY} ACCEL={RUN_ACCEL} ACCEL_TO_DECEL={RUN_DECEL}
  512. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}
  513. #SDCARD_RESET_FILE
  514. M400 # wait for buffer to clear
  515. G92 E0 # zero the extruder
  516. G1 E-5.0 F1200 # retract filament
  517. # Present the print
  518. G91 # Use Relative coordinates
  519. G1 Z20 F240 # Move 20mm upwards
  520. G90 # Use Absolute coordinates
  521. G1 X-7 F3600 # Move to off the left of the Bed
  522. G1 Y230 F3600 # Move the Bed fully forwards
  523. # Turn off bed, extruder, fans
  524. M140 S0
  525. M104 S0
  526. M106 S0
  527. # Disable steppers
  528. M84
  529.  
  530. [gcode_macro PRINT_END]
  531. gcode:
  532. END_PRINT
  533.  
  534. [pause_resume]
  535.  
  536. [gcode_macro CANCEL_PRINT]
  537. rename_existing: BASE_CANCEL_PRINT
  538. gcode:
  539. END_PRINT
  540.  
  541. [gcode_macro PAUSE]
  542. rename_existing: BASE_PAUSE
  543. gcode:
  544. M400
  545. {% set z = params.Z|default(10)|int %}
  546. {% set e = params.E|default(2.5) %}
  547. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z}
  548. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target}
  549. SAVE_GCODE_STATE NAME=PAUSE
  550. M25
  551. {% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %}
  552. G91
  553. M83
  554. G1 E-{e} F2100
  555. G1 Z{z} F900
  556. {% else %}
  557. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
  558. {% endif %}
  559. SAVE_GCODE_STATE NAME=PAUSEPARK
  560. G90
  561. G1 X0 Y220 F6000
  562. G1 E{e} F2100
  563. SET_IDLE_TIMEOUT TIMEOUT=43200
  564.  
  565. [gcode_macro RESUME]
  566. rename_existing: BASE_RESUME
  567. variable_zhop: 0
  568. variable_etemp: 0
  569. gcode:
  570. {% set e = params.E|default(2.5)|int %}
  571. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}
  572. G91
  573. M83
  574. G1 E-{e} F900
  575. RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100
  576. {% if printer[printer.toolhead.extruder].temperature >= printer.configfile.settings.extruder.min_extrude_temp %}
  577. G1 Z{zhop * -1} F900
  578. G1 E{e+0.5} F900
  579. {% else %}
  580. G1 Z{zhop * -1} F900
  581. {% endif %}
  582. M400
  583. RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60
  584. M24
  585.  
  586. [gcode_macro BED_SCREWS]
  587. description: screws_tilt_calculate
  588. gcode:
  589. RESPOND TYPE=error MSG='Preparing to do the Bed Screws measurements....'
  590. G4 P1000
  591. {% if printer.toolhead.homed_axes != "xyz" %}
  592. {action_raise_error("Homing the XYZ Axis")}
  593. RESPOND TYPE=error MSG='Need to a Home All first.....'
  594. G4 P1000
  595. G28
  596. {% endif %}
  597. #LEDS_FRAME_ON
  598. RESPOND TYPE=error MSG='Making asure the Bed Temp is 60degC....'
  599. G4 P1000
  600. M190 S60 # Heat the Bed and WAIT for that to complete
  601. RESPOND TYPE=error MSG='The Bed Temp is 60degC.... ready to measure....'
  602. G4 P1000
  603. SCREWS_TILT_CALCULATE
  604. RESPOND TYPE=error MSG='Adjust screws as outlined, then run Bed Screws again'
  605. RESPOND TYPE=error MSG='Until they are all very close in values.'
  606. G4 P1000
  607. #LEDS_FRAME_OFF
  608. M140 S0
  609.  
  610. [gcode_macro BED_MESH_60]
  611. description: Create a Bed Mesh for 60degC
  612. gcode:
  613. RESPOND TYPE=error MSG='Beginning Bed Mesh creation for 60degC'
  614. G4 P1000
  615. #RESPOND TYPE=error MSG='Turning the Frame LEDs ON'
  616. #G4 P1000
  617. #LEDS_FRAME_ON
  618. RESPOND TYPE=error MSG='Doing a Home All Axis'
  619. G4 P1000
  620. G28
  621. RESPOND TYPE=error MSG='Making sure the Bed is at 60degC.....'
  622. G4 P1000
  623. M190 S60 # Heat the Bed and WAIT for that to complete
  624. RESPOND TYPE=error MSG='Starting the Bed Mesh Calibrate process....'
  625. G4 P1000
  626. BED_MESH_CALIBRATE
  627. RESPOND TYPE=error MSG='Bed Mesh creation complete!!'
  628. G4 P1000
  629. BED_MESH_PROFILE SAVE=BED60
  630. RESPOND TYPE=error MSG='Save the Config !!!'
  631. G4 P1000
  632. #RESPOND TYPE=error MSG='Turning the Frame LEDs OFF'
  633. #G4 P1000
  634. #LEDS_FRAME_OFF
  635. M140 S0
  636.  
  637. #####################################################################
  638. # Screws Tilt Adjust
  639. #####################################################################
  640.  
  641. [screws_tilt_adjust]
  642. screw1: 62, 15
  643. screw1_name: Front Left screw
  644.  
  645. screw2: 62, 192
  646. screw2_name: Middle Left screw
  647.  
  648. screw3: 62, 370
  649. screw3_name: Rear Left screw
  650.  
  651. screw4: 422, 370
  652. screw4_name: Rear Right screw
  653.  
  654. screw5: 422, 192
  655. screw5_name: Middle Right screw
  656.  
  657. screw6: 422, 15
  658. screw6_name: Front Right screw
  659.  
  660. horizontal_move_z: 10.0
  661. speed: 120.0
  662. screw_thread: CW-M3
  663.  
  664. ####################################################################
  665. # G-Code Emulation Macros
  666. #####################################################################
  667.  
  668. [gcode_macro G29]
  669. gcode:
  670. BED_MESH_CLEAR
  671. G28
  672. BED_MESH_CALIBRATE
  673. G0 X205 Y205 Z5 F3000
  674. G0 Z0 F300
  675.  
  676. [gcode_macro M84]
  677. rename_existing:M84.1
  678. gcode:
  679. SET_STEPPER_ENABLE STEPPER=stepper_x enable=0
  680. SET_STEPPER_ENABLE STEPPER=stepper_y enable=0
  681. SET_STEPPER_ENABLE STEPPER=stepper_z enable=0
  682. SET_STEPPER_ENABLE STEPPER=extruder enable=0
  683. SET_KINEMATIC_POSITION
  684.  
  685. [gcode_macro M109]
  686. rename_existing: M99109
  687. gcode:
  688. #Parameters
  689. {% set temp = params.S|default(0)|float %}
  690. M104 S220
  691. WAIT_TEMP {temp}
  692.  
  693. [gcode_macro M140]
  694. rename_existing: M99140
  695. gcode:
  696. {% set s = params.S|float %}
  697. {% if params.S is defined %}
  698. {% if params.S|float >= 100 %}
  699. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=100
  700. {% else %}
  701. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S|int}
  702. {% endif %}
  703. {% endif %}
  704.  
  705. [gcode_macro M190]
  706. rename_existing: M99190
  707. gcode:
  708. {% set s = params.S|float %}
  709. {% if params.S is defined %}
  710. {% if params.S|float >= 95 %}
  711. {% if params.S|float >= 100 %}
  712. {% set s = 90 %}
  713. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=100
  714. {% else %}
  715. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S|int}
  716. {% endif %}
  717. TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-5} MAXIMUM={s+5}
  718. {% else %}
  719. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S|int}
  720. TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-1} MAXIMUM={s+1}
  721. {% endif %}
  722. {% endif %}
  723.  
  724. [gcode_macro SMART_PARK]
  725. description: Move the printhead to a specified height for Smart Park
  726. gcode:
  727. G91 # Set relative positioning
  728. G1 Z{params.smart_park_height|default(10)} F6000 # Move Z-axis to the specified height (default is 10mm)
  729. G90
  730.  
  731. [gcode_macro START_PRINT]
  732. gcode:
  733. {% set BED_TEMP = params.BED_TEMP|default(0)|float %}
  734. {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(0)|float %}
  735. ; Put printing message on LCD screen
  736. M117 Heating...
  737. M140 S{BED_TEMP} ; set bed temp
  738. G28 ; Home all axes
  739. SMART_PARK smart_park_height=20 # Move the printhead to 20mm height
  740. M190 S{BED_TEMP} ; wait for bed temp
  741. M104 S{EXTRUDER_TEMP} ; set extruder temp
  742. M109 S{EXTRUDER_TEMP} ; wait for extruder temp
  743. M117 Priming...
  744. ; Start of actual print code
  745. G92 E0 ; reset extruder
  746. G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
  747. G1 X10 Y10 Z0.3 F5000.0 ; Move over to prevent blob squish
  748.  
  749. [gcode_macro M203]
  750. description: Sets maximum velocity.
  751. Usage: M203 [X<velocity>] [Y<velocity>]
  752. gcode:
  753. {% if 'X' in params or 'Y' in params %}
  754. {% set velocity = (params.X|default(params.Y)|float,
  755. params.Y|default(params.X)|float)|min %}
  756. SET_VELOCITY_LIMIT VELOCITY="{velocity}"
  757. {% else %}
  758. SET_VELOCITY_LIMIT
  759. {% endif %}
  760.  
  761. [gcode_macro M205]
  762. description: Sets square corner velocity.
  763. Usage: M205 [X<velocity>] [Y<velocity>]
  764. gcode:
  765. {% if 'X' in params or 'Y' in params %}
  766. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY="{
  767. (params.X|default(0)|float, params.Y|default(0)|float)|min}"
  768. {% else %}
  769. SET_VELOCITY_LIMIT
  770. {% endif %}
  771.  
  772. ####################################################################
  773. # Delayed G-Code Macros
  774. #####################################################################
  775.  
  776. [delayed_gcode KINEMATIC_POSITION]
  777. initial_duration:0.2
  778. gcode:
  779. SET_KINEMATIC_POSITION X=110
  780. SET_KINEMATIC_POSITION Y=110
  781. SET_KINEMATIC_POSITION Z=0
  782.  
  783. [include moonraker_obico_macros.cfg]
  784.  
  785. [include KAMP_Settings.cfg]
  786.  
  787. #*# <---------------------- SAVE_CONFIG ---------------------->
  788. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  789. #*#
  790. #*# [probe]
  791. #*# z_offset = 1.360
  792. #*#
  793. #*# [input_shaper]
  794. #*# shaper_type_x = mzv
  795. #*# shaper_freq_x = 63.8
  796. #*#
  797. #*# [bed_mesh re]
  798. #*# version = 1
  799. #*# points =
  800. #*# 0.082500, 0.042500, -0.007500, -0.065000, -0.072500, -0.110000, -0.072500, -0.025000, 0.030000, 0.072500, 0.107500
  801. #*# 0.042500, 0.012500, 0.050000, -0.042500, -0.107500, -0.132500, -0.075000, -0.020000, 0.030000, 0.092500, 0.140000
  802. #*# 0.047500, 0.025000, -0.032500, -0.065000, -0.087500, -0.117500, -0.052500, 0.005000, 0.072500, 0.125000, 0.155000
  803. #*# 0.050000, 0.015000, -0.017500, -0.077500, -0.092500, -0.102500, -0.042500, 0.017500, 0.065000, 0.120000, 0.157500
  804. #*# 0.052500, 0.042500, 0.012500, -0.025000, -0.025000, -0.047500, 0.007500, 0.060000, 0.097500, 0.125000, 0.140000
  805. #*# 0.042500, 0.022500, 0.005000, -0.002500, 0.005000, 0.015000, 0.095000, 0.072500, 0.105000, 0.130000, 0.150000
  806. #*# 0.032500, 0.015000, -0.002500, -0.012500, -0.002500, -0.007500, 0.015000, 0.047500, 0.055000, 0.080000, 0.082500
  807. #*# 0.002500, -0.027500, -0.037500, -0.052500, -0.042500, -0.047500, -0.010000, 0.037500, -0.002500, 0.047500, 0.067500
  808. #*# -0.012500, -0.035000, -0.060000, -0.067500, -0.052500, -0.067500, -0.022500, 0.017500, 0.007500, 0.050000, 0.067500
  809. #*# 0.012500, -0.027500, -0.062500, -0.075000, -0.072500, -0.085000, -0.040000, 0.002500, 0.025000, 0.055000, 0.105000
  810. #*# 0.125000, 0.102500, 0.030000, 0.002500, -0.010000, -0.027500, 0.012500, 0.077500, 0.107500, 0.145000, 0.195000
  811. #*# x_count = 11
  812. #*# y_count = 11
  813. #*# mesh_x_pps = 4
  814. #*# mesh_y_pps = 4
  815. #*# algo = bicubic
  816. #*# tension = 0.2
  817. #*# min_x = 10.0
  818. #*# max_x = 397.0
  819. #*# min_y = 21.0
  820. #*# max_y = 403.90000000000003
  821. #*#
  822. #*# [bed_mesh better]
  823. #*# version = 1
  824. #*# points =
  825. #*# 0.037500, 0.037500, 0.022500, -0.015000, -0.017500, -0.045000, -0.015000, 0.007500, 0.032500, 0.030000, 0.007500
  826. #*# -0.015000, -0.002500, 0.050000, 0.002500, -0.045000, -0.065000, -0.020000, 0.007500, 0.030000, 0.040000, 0.037500
  827. #*# -0.005000, 0.010000, -0.025000, -0.037500, -0.050000, -0.077500, -0.025000, 0.007500, 0.042500, 0.047500, 0.045000
  828. #*# 0.000000, 0.000000, -0.012500, -0.047500, -0.060000, -0.072500, -0.025000, 0.007500, 0.025000, 0.032500, 0.027500
  829. #*# 0.012500, 0.022500, 0.015000, 0.005000, 0.010000, -0.017500, 0.025000, 0.037500, 0.047500, 0.027500, -0.012500
  830. #*# 0.000000, 0.020000, 0.025000, 0.040000, 0.052500, 0.047500, 0.105000, 0.055000, 0.055000, 0.027500, -0.012500
  831. #*# 0.012500, 0.027500, 0.030000, 0.035000, 0.052500, 0.040000, 0.052500, 0.035000, 0.010000, -0.017500, -0.060000
  832. #*# -0.037500, -0.035000, -0.022500, -0.010000, 0.010000, -0.002500, 0.022500, 0.020000, -0.037500, -0.042500, -0.070000
  833. #*# 0.005000, 0.020000, 0.022500, 0.035000, 0.057500, 0.042500, 0.077500, 0.077500, 0.050000, 0.045000, 0.032500
  834. #*# 0.007500, -0.002500, -0.007500, 0.007500, 0.020000, 0.010000, 0.052500, 0.060000, 0.067500, 0.052500, 0.055000
  835. #*# 0.070000, 0.087500, 0.052500, 0.057500, 0.065000, 0.052500, 0.090000, 0.122500, 0.142500, 0.145000, 0.170000
  836. #*# x_count = 11
  837. #*# y_count = 11
  838. #*# mesh_x_pps = 4
  839. #*# mesh_y_pps = 4
  840. #*# algo = bicubic
  841. #*# tension = 0.2
  842. #*# min_x = 10.0
  843. #*# max_x = 397.0
  844. #*# min_y = 21.0
  845. #*# max_y = 403.90000000000003
  846. #*#
  847. #*# [bed_mesh 8/10/24]
  848. #*# version = 1
  849. #*# points =
  850. #*# 0.090000, 0.092500, 0.075000, 0.045000, 0.037500, 0.015000, 0.045000, 0.057500, 0.090000, 0.095000, 0.065000
  851. #*# 0.007500, 0.010000, 0.037500, 0.010000, -0.030000, -0.050000, 0.002500, 0.027500, 0.062500, 0.085000, 0.077500
  852. #*# -0.005000, -0.005000, -0.037500, -0.050000, -0.057500, -0.087500, -0.030000, -0.002500, 0.037500, 0.047500, 0.042500
  853. #*# -0.035000, -0.040000, -0.062500, -0.090000, -0.097500, -0.105000, -0.050000, -0.025000, 0.002500, 0.015000, 0.012500
  854. #*# -0.025000, -0.030000, -0.047500, -0.052500, -0.045000, -0.075000, -0.027500, -0.020000, 0.000000, -0.007500, -0.032500
  855. #*# -0.050000, -0.045000, -0.052500, -0.037500, -0.022500, -0.027500, 0.032500, 0.000000, 0.015000, 0.005000, -0.015000
  856. #*# -0.017500, -0.027500, -0.040000, -0.037500, -0.030000, -0.045000, -0.030000, -0.047500, -0.057500, -0.067500, -0.102500
  857. #*# -0.055000, -0.072500, -0.082500, -0.080000, -0.070000, -0.087500, -0.060000, -0.065000, -0.112500, -0.112500, -0.135000
  858. #*# 0.002500, 0.000000, -0.017500, -0.007500, 0.005000, -0.015000, 0.025000, 0.020000, 0.005000, 0.005000, 0.000000
  859. #*# -0.002500, -0.017500, -0.030000, -0.015000, -0.005000, -0.022500, 0.035000, 0.042500, 0.045000, 0.035000, 0.047500
  860. #*# 0.057500, 0.060000, 0.020000, 0.025000, 0.027500, 0.017500, 0.092500, 0.077500, 0.095000, 0.092500, 0.107500
  861. #*# x_count = 11
  862. #*# y_count = 11
  863. #*# mesh_x_pps = 4
  864. #*# mesh_y_pps = 4
  865. #*# algo = bicubic
  866. #*# tension = 0.2
  867. #*# min_x = 10.0
  868. #*# max_x = 397.0
  869. #*# min_y = 21.0
  870. #*# max_y = 403.90000000000003
  871. #*#
  872. #*# [bed_mesh default]
  873. #*# version = 1
  874. #*# points =
  875. #*# 0.122500, 0.130000, 0.112500, 0.080000, 0.075000, 0.055000, 0.072500, 0.110000, 0.107500, 0.092500, 0.112500
  876. #*# 0.090000, 0.080000, 0.092500, 0.037500, 0.020000, -0.007500, 0.030000, 0.082500, 0.097500, 0.090000, 0.122500
  877. #*# 0.100000, 0.080000, 0.037500, 0.007500, 0.000000, -0.032500, 0.010000, 0.067500, 0.085000, 0.082500, 0.122500
  878. #*# 0.102500, 0.065000, 0.030000, -0.017500, -0.027500, -0.042500, -0.002500, 0.062500, 0.065000, 0.067500, 0.107500
  879. #*# 0.097500, 0.082500, 0.055000, 0.035000, 0.040000, 0.022500, 0.045000, 0.092500, 0.087500, 0.070000, 0.092500
  880. #*# 0.092500, 0.095000, 0.072500, 0.065000, 0.082500, 0.075000, 0.115000, 0.130000, 0.107500, 0.085000, 0.112500
  881. #*# 0.087500, 0.077500, 0.065000, 0.060000, 0.080000, 0.072500, 0.085000, 0.115000, 0.070000, 0.052500, 0.065000
  882. #*# 0.072500, 0.052500, 0.042500, 0.035000, 0.057500, 0.055000, 0.070000, 0.095000, 0.035000, 0.025000, 0.042500
  883. #*# 0.105000, 0.097500, 0.085000, 0.087500, 0.115000, 0.110000, 0.132500, 0.167500, 0.140000, 0.117500, 0.155000
  884. #*# 0.117500, 0.097500, 0.085000, 0.087500, 0.115000, 0.115000, 0.145000, 0.200000, 0.182500, 0.155000, 0.207500
  885. #*# 0.135000, 0.127500, 0.105000, 0.102500, 0.127500, 0.122500, 0.182500, 0.220000, 0.227500, 0.217500, 0.277500
  886. #*# x_count = 11
  887. #*# y_count = 11
  888. #*# mesh_x_pps = 4
  889. #*# mesh_y_pps = 4
  890. #*# algo = bicubic
  891. #*# tension = 0.2
  892. #*# min_x = 10.0
  893. #*# max_x = 397.0
  894. #*# min_y = 21.0
  895. #*# max_y = 403.90000000000003
  896. #*#
  897. #*# [bed_mesh .2025]
  898. #*# version = 1
  899. #*# points =
  900. #*# 0.065000, 0.067500, 0.055000, 0.025000, 0.022500, 0.000000, 0.030000, 0.045000, 0.072500, 0.075000, 0.050000
  901. #*# -0.015000, -0.007500, 0.022500, -0.007500, -0.040000, -0.062500, -0.007500, 0.015000, 0.047500, 0.065000, 0.072500
  902. #*# -0.025000, -0.017500, -0.047500, -0.052500, -0.060000, -0.090000, -0.032500, -0.007500, 0.027500, 0.035000, 0.037500
  903. #*# -0.037500, -0.042500, -0.062500, -0.090000, -0.095000, -0.105000, -0.050000, -0.025000, -0.002500, 0.007500, 0.010000
  904. #*# -0.022500, -0.027500, -0.045000, -0.045000, -0.040000, -0.067500, -0.025000, -0.017500, -0.002500, -0.010000, -0.035000
  905. #*# -0.045000, -0.042500, -0.047500, -0.037500, -0.022500, -0.030000, 0.025000, -0.005000, 0.007500, -0.002500, -0.017500
  906. #*# -0.017500, -0.022500, -0.035000, -0.035000, -0.022500, -0.040000, -0.025000, -0.037500, -0.045000, -0.060000, -0.095000
  907. #*# -0.045000, -0.062500, -0.070000, -0.065000, -0.052500, -0.072500, -0.047500, -0.050000, -0.102500, -0.105000, -0.122500
  908. #*# -0.017500, -0.020000, -0.037500, -0.027500, -0.010000, -0.030000, 0.007500, 0.007500, -0.015000, -0.015000, -0.035000
  909. #*# 0.005000, -0.010000, -0.020000, -0.007500, 0.002500, -0.012500, 0.035000, 0.042500, 0.047500, 0.035000, 0.040000
  910. #*# 0.035000, 0.037500, 0.002500, 0.010000, 0.015000, 0.002500, 0.070000, 0.065000, 0.075000, 0.070000, 0.080000
  911. #*# x_count = 11
  912. #*# y_count = 11
  913. #*# mesh_x_pps = 4
  914. #*# mesh_y_pps = 4
  915. #*# algo = bicubic
  916. #*# tension = 0.2
  917. #*# min_x = 10.0
  918. #*# max_x = 397.0
  919. #*# min_y = 21.0
  920. #*# max_y = 403.90000000000003
  921. #*#
  922. #*# [bed_mesh def]
  923. #*# version = 1
  924. #*# points =
  925. #*# 0.122500, 0.130000, 0.112500, 0.080000, 0.075000, 0.055000, 0.072500, 0.110000, 0.107500, 0.092500, 0.112500
  926. #*# 0.090000, 0.080000, 0.092500, 0.037500, 0.020000, -0.007500, 0.030000, 0.082500, 0.097500, 0.090000, 0.122500
  927. #*# 0.100000, 0.080000, 0.037500, 0.007500, 0.000000, -0.032500, 0.010000, 0.067500, 0.085000, 0.082500, 0.122500
  928. #*# 0.102500, 0.065000, 0.030000, -0.017500, -0.027500, -0.042500, -0.002500, 0.062500, 0.065000, 0.067500, 0.107500
  929. #*# 0.097500, 0.082500, 0.055000, 0.035000, 0.040000, 0.022500, 0.045000, 0.092500, 0.087500, 0.070000, 0.092500
  930. #*# 0.092500, 0.095000, 0.072500, 0.065000, 0.082500, 0.075000, 0.115000, 0.130000, 0.107500, 0.085000, 0.112500
  931. #*# 0.087500, 0.077500, 0.065000, 0.060000, 0.080000, 0.072500, 0.085000, 0.115000, 0.070000, 0.052500, 0.065000
  932. #*# 0.072500, 0.052500, 0.042500, 0.035000, 0.057500, 0.055000, 0.070000, 0.095000, 0.035000, 0.025000, 0.042500
  933. #*# 0.105000, 0.097500, 0.085000, 0.087500, 0.115000, 0.110000, 0.132500, 0.167500, 0.140000, 0.117500, 0.155000
  934. #*# 0.117500, 0.097500, 0.085000, 0.087500, 0.115000, 0.115000, 0.145000, 0.200000, 0.182500, 0.155000, 0.207500
  935. #*# 0.135000, 0.127500, 0.105000, 0.102500, 0.127500, 0.122500, 0.182500, 0.220000, 0.227500, 0.217500, 0.277500
  936. #*# x_count = 11
  937. #*# y_count = 11
  938. #*# mesh_x_pps = 4
  939. #*# mesh_y_pps = 4
  940. #*# algo = bicubic
  941. #*# tension = 0.2
  942. #*# min_x = 10.0
  943. #*# max_x = 397.0
  944. #*# min_y = 21.0
  945. #*# max_y = 403.90000000000003
  946.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement