Advertisement
hazmatious

Neptune4 KAMP Printer.conf

Mar 17th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.74 KB | None | 0 0
  1. ####################################################################################
  2. # Machine type: NEPTUNE 4
  3. # Current configuration version: V1.4
  4. # Date:2023-12-1
  5. ####################################################################################
  6. # This product (Neptune 4/4pro/4plus/4max) adopts Klipper firmware
  7. # and does not support users to update the official klipper/fluidd
  8. # /moonraker by themselves, otherwise the machine will not work properly.
  9. # If you want to DIY and are an expert or interested in this field,
  10. # we recommend that you prepare your own tools for burning images so
  11. # that you can restore them if problems arise. Please contact after-sales
  12. # support team for tutorials on burning images. Thank you for your cooperation!
  13. ####################################################################################
  14. # This file contains common pin mappings for ZNP-K1-V1.0
  15. # boards. To use this config, the firmware should be compiled for the
  16. # STM32F402. When running "make menuconfig", enable "extra low-level
  17. # configuration setup", select the 32KiB bootloader, and serial (on
  18. # USART1 PA10/PA9) communication.
  19.  
  20. # The "make flash" command does not work on the ZN-K1-V1.0. Instead,
  21. # after running "make", copy the generated "out/klipper.bin" file to a
  22. # file named "elegoo_k1.bin" on an SD card and then restart the ZNP-K1-V1.0
  23. # with that SD card.
  24.  
  25. # See docs/Config_Reference.md for a description of parameters.
  26. ####################################################################################
  27.  
  28.  
  29. [include plr.cfg]
  30.  
  31. [include KAMP_Settings.cfg]
  32.  
  33. [exclude_object]
  34.  
  35. [mcu]
  36. # The hardware use USART1 PA10/PA9 connect to RK3328
  37. serial: /dev/ttyS0
  38. restart_method: command
  39.  
  40. [stepper_x]
  41. step_pin:PC14
  42. dir_pin:PC13
  43. enable_pin:!PC15
  44. microsteps: 16
  45. rotation_distance: 40
  46. full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
  47. endstop_pin:PC0
  48. position_min: -6
  49. position_endstop:-4
  50. position_max: 235
  51. homing_speed:50
  52. homing_retract_dist:5
  53. homing_positive_dir:false
  54.  
  55. [stepper_y]
  56. step_pin:PB4
  57. dir_pin:PB3
  58. enable_pin:!PB5
  59. microsteps:16
  60. rotation_distance: 40
  61. full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
  62. endstop_pin:PB8
  63. position_min: -2
  64. position_endstop:0
  65. position_max:235
  66. homing_speed:50
  67. homing_retract_dist:5
  68. homing_positive_dir:false
  69.  
  70.  
  71. [stepper_z]
  72. step_pin:PC10
  73. dir_pin:!PA15
  74. enable_pin: !PC11
  75. microsteps: 16
  76. rotation_distance: 8
  77. full_steps_per_rotation: 200
  78. endstop_pin:probe:z_virtual_endstop ## PB12 for Z-max; endstop have'!' is NO
  79.  
  80. ## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
  81. ## (+) value = endstop above Z0, (-) value = endstop below
  82. ## Increasing position_endstop brings nozzle closer to the bed
  83. ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
  84. #position_endstop:-5
  85. position_max: 268
  86. position_min: -5
  87. homing_speed: 8
  88. homing_retract_dist: 5
  89. second_homing_speed: 3
  90.  
  91. [extruder]
  92. step_pin:PA5
  93. dir_pin:!PA6
  94. enable_pin:!PA4
  95. microsteps:16
  96. rotation_distance: 28.7086 #31.4 #Bondtech 5mm Drive Gears
  97. gear_ratio: 52:10
  98. full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
  99. nozzle_diameter: 0.400
  100. filament_diameter: 1.750
  101. min_temp: 0
  102. max_temp: 330
  103. heater_pin: PA7
  104. sensor_type:NTC 100K MGB18-104F39050L32
  105. sensor_pin: PA1
  106. max_power: 1
  107. control :pid
  108. pid_kp : 26.213
  109. pid_ki : 1.304
  110. pid_kd : 131.721
  111. pressure_advance: 0.020
  112. pressure_advance_smooth_time: 0.01
  113. instantaneous_corner_velocity: 2.5
  114. max_extrude_only_distance: 300
  115. max_extrude_only_velocity:60
  116. max_extrude_only_accel:5000
  117. max_extrude_cross_section: 99
  118. min_extrude_temp:100
  119.  
  120. [verify_heater extruder]
  121. max_error: 120
  122. check_gain_time:30
  123. hysteresis: 10
  124. heating_gain: 2
  125.  
  126. [heater_bed]
  127. heater_pin:PB10
  128. sensor_type: NTC 100K MGB18-104F39050L32
  129. sensor_pin: PA0
  130. max_power: 1.0
  131. control = watermark
  132. min_temp: 0
  133. max_temp: 120
  134.  
  135.  
  136. [verify_heater heater_bed]
  137. max_error: 120
  138. check_gain_time:120
  139. hysteresis: 10
  140. heating_gain: 2
  141.  
  142.  
  143.  
  144. [respond]
  145. default_type: echo
  146. default_prefix: echo:
  147.  
  148. [virtual_sdcard]
  149. path: ~/gcode_files
  150. on_error_gcode:
  151. # test OK
  152. G91
  153. G1 Z25 F900
  154. G90
  155. TURN_OFF_HEATERS
  156. M106 S100
  157. M84
  158. M300 P10000 S1
  159. G4 P300
  160. M300
  161. M300
  162. M300
  163. M300
  164. M300
  165. M300
  166. M300
  167. M300
  168. M300
  169. M300
  170. M300
  171.  
  172. ########################################
  173. # PRINT_START/CANCEL_PRINT/PAUSE/RESUME/filament_switch_sensor
  174. ########################################
  175.  
  176. [print_stats]
  177.  
  178. [gcode_move]
  179.  
  180. [gcode_macro PRINT_START]
  181. gcode:
  182. SAVE_VARIABLE VARIABLE=was_interrupted VALUE=True
  183. G92 E0
  184. G90
  185. CLEAR_PAUSE
  186. M117 Printing
  187.  
  188. [gcode_macro START_PRINT]
  189. gcode:
  190. M118 Calibrate Print
  191. ; Get first-layer bed-temp from slicer
  192. {% set BED_TEMP = params.BED|default(60)|float %}
  193. ; Get first-layer extruder-temp from slicer
  194. {% set EXTRUDER_TEMP = params.EXTRUDER|default(170)|float %}
  195. M104 S150 ; set extruder temp for bed leveling
  196. M140 S{BED_TEMP} ; set bed temp
  197. M109 S150 ; wait for bed leveling temp
  198. M190 S{BED_TEMP} ; wait for bed temp
  199. G28 ; home all axis
  200. ; mesh bed
  201. BED_MESH_CLEAR
  202. ; BED_MESH_PROFILE load=6
  203. BED_MESH_CALIBRATE
  204. M104 S{EXTRUDER_TEMP} ;set extruder temp
  205. M109 S{EXTRUDER_TEMP} ; wait for extruder temp
  206.  
  207. [gcode_macro PRINT_END]
  208. gcode:
  209. SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False
  210. RUN_SHELL_COMMAND CMD=clear_plr
  211. clear_last_file
  212. {% set RUN_VELOCITY = printer.configfile.settings['printer'].max_velocity|float %}
  213. {% set RUN_ACCEL = printer.configfile.settings['printer'].max_accel|float %}
  214. {% set RUN_DECEL = printer.configfile.settings['printer'].max_accel_to_decel|float %}
  215. SET_VELOCITY_LIMIT VELOCITY={RUN_VELOCITY} ACCEL={RUN_ACCEL} ACCEL_TO_DECEL={RUN_DECEL}
  216. M220 S100
  217. M221 S100
  218. {% set z = params.Z|default(100)|int %}
  219. {% if (printer.gcode_move.position.z+5) < z %}
  220. G90 ; absolute positioning
  221. G1 Z{z+5} F6000 ; park nozzle at rear
  222. {% endif %}
  223. TURN_OFF_HEATERS
  224. M107
  225. M84
  226.  
  227.  
  228. [gcode_macro CANCEL_PRINT]
  229. rename_existing: BASE_CANCEL_PRINT
  230. gcode:
  231. SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False
  232. RUN_SHELL_COMMAND CMD=clear_plr
  233. clear_last_file
  234. {% set RUN_VELOCITY = printer.configfile.settings['printer'].max_velocity|float %}
  235. {% set RUN_ACCEL = printer.configfile.settings['printer'].max_accel|float %}
  236. {% set RUN_DECEL = printer.configfile.settings['printer'].max_accel_to_decel|float %}
  237. SET_VELOCITY_LIMIT VELOCITY={RUN_VELOCITY} ACCEL={RUN_ACCEL} ACCEL_TO_DECEL={RUN_DECEL}
  238. {% set z = params.Z|default(100)|int %}
  239. {% set x_park = params.X|default(printer.toolhead.axis_minimum.x+5)|int %}
  240. {% set y_park = params.Y|default(printer.toolhead.axis_maximum.y-5)|int %}
  241. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}
  242. SDCARD_RESET_FILE
  243. M400
  244. M220 S100
  245. M221 S100
  246. G91
  247. M83
  248. G1 E-10.0 F1200
  249. TURN_OFF_HEATERS
  250. M107
  251. {% if (printer.gcode_move.position.z+5) < z %}
  252. G90
  253. G0 X{x_park} Y{y_park} Z{z+5} F6000
  254. {% endif %}
  255. {%if (printer.gcode_move.position.z+5) >= z %}
  256. {%if (printer.gcode_move.position.z+5) < printer.toolhead.axis_maximum.z %}
  257. G91
  258. G1 Z5 F300
  259. G90
  260. G0 X{x_park} Y{y_park} F6000
  261. {% else %}
  262. G90
  263. G0 X{x_park} Y{y_park} Z{printer.toolhead.axis_maximum.z} F6000
  264. {% endif %}
  265. {% endif %}
  266. M84
  267.  
  268. [pause_resume]
  269. recover_velocity: 50.0
  270.  
  271. [gcode_macro PAUSE]
  272. rename_existing: BASE_PAUSE
  273. gcode:
  274. M400
  275. {% set z = params.Z|default(30)|int %}
  276. {% set E = (params.E|default(2))|float %}
  277. {% set x_park = params.X|default(printer.toolhead.axis_minimum.x+5)|int %}
  278. {% set y_park = params.Y|default(printer.toolhead.axis_maximum.y-5)|int %}
  279.  
  280. {% if (printer.gcode_move.position.x) <= (x_park+1) and (printer.gcode_move.position.y) >= (y_park-1) %}
  281. M400
  282. {% else %}
  283. {% set position = printer.gcode_move.gcode_position %}
  284. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_x VALUE="{position.x}"
  285. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_y VALUE="{position.y}"
  286. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_z VALUE="{position.z}"
  287. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_e VALUE="{E}"
  288. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target}
  289. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=bed_temp VALUE={printer['heater_bed'].target}
  290. SAVE_GCODE_STATE NAME=timelapse_state_a
  291. M83
  292. G91
  293. {% if (printer.gcode_move.position.z+5) < printer.toolhead.axis_maximum.z %}
  294. G1 E-2 X3 Z1 F2100
  295. G1 Z4 F600
  296. {% endif %}
  297. SAVE_GCODE_STATE NAME=timelapse_state_b
  298. G90
  299. {% if (printer.gcode_move.position.z+5) < z %}
  300. G1 Z{z+5} X{x_park} Y{y_park} E-20 F6000
  301. {% else %}
  302. G1 X{x_park} Y{y_park} E-20 F6000
  303. {% endif %}
  304. M400
  305. M25
  306. SET_IDLE_TIMEOUT TIMEOUT=1200
  307. M400
  308. {% endif %}
  309.  
  310.  
  311.  
  312. [gcode_macro RESUME]
  313. rename_existing: BASE_RESUME
  314. variable_zhop: 0
  315. variable_etemp: 0
  316. variable_bed_temp: 0
  317. variable_saved_x: 0.0
  318. variable_saved_y: 0.0
  319. variable_saved_z: 0.0
  320. variable_saved_e: 0.0
  321. gcode:
  322. M24
  323. {% set e = params.E|default(2)|int %}
  324. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout}
  325. {% if printer[printer.toolhead.extruder].temperature < etemp-4 %}
  326. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={etemp}
  327. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp}
  328. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={etemp-4} MAXIMUM={etemp+10}
  329. {% endif %}
  330. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={etemp}
  331. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp}
  332. M17 E
  333. G91
  334. M83
  335. G1 E100 F200
  336. G4 P2000
  337. G1 X20 F15000
  338. G1 X-20
  339. G1 X20
  340. G1 X-20
  341. G1 X20
  342. G1 X-20
  343. ;G1 E-2 F600
  344. G90
  345. G92 E{saved_e}
  346. RESTORE_GCODE_STATE NAME=timelapse_state_b MOVE=1 MOVE_SPEED=250
  347. RESTORE_GCODE_STATE NAME=timelapse_state_a MOVE=1 MOVE_SPEED=250
  348. SAVE_GCODE_STATE NAME=timelapse_state_a
  349. SAVE_GCODE_STATE NAME=timelapse_state_b
  350. M400
  351. ;M24
  352.  
  353. [filament_switch_sensor fila]
  354. pause_on_runout: True
  355. runout_gcode:
  356. SET_FILAMENT_SENSOR SENSOR=fila ENABLE=1
  357. insert_gcode:
  358. event_delay: 3.0
  359. pause_delay: 1.0
  360. switch_pin: PA12
  361.  
  362. ##############################################################
  363.  
  364.  
  365. #fan for printed model FAN0
  366. [fan]
  367. pin: PC9
  368.  
  369. # fan for hotend FAN1
  370. [heater_fan fan1]
  371. pin: PA8
  372. shutdown_speed: 1
  373.  
  374. # [controller_fan controller_fan1]
  375. # pin: PA8
  376. # fan_speed: 1.0
  377. # idle_timeout: 900
  378.  
  379.  
  380. [printer]
  381. kinematics:cartesian
  382. max_velocity: 500
  383. max_accel: 5000
  384. max_accel_to_decel: 2500
  385. max_z_velocity: 20
  386. max_z_accel: 100
  387. square_corner_velocity: 9.0
  388.  
  389. [input_shaper]
  390. shaper_freq_x: 66.66
  391. shaper_freq_y: 42.05
  392. shaper_type_x: mzv
  393. shaper_type_y: ei
  394. #damping_ratio_x: 0.1
  395. #damping_ratio_y: 0.1
  396.  
  397. ####################################################################
  398. # Homing and Gantry Adjustment Routines
  399. #####################################################################
  400. [idle_timeout]
  401. timeout: 36000
  402. gcode:
  403. M118 Idle Timeout!!!
  404. {% if printer[printer.toolhead.extruder].temperature > 140 %} # Reduce the hot end temperature after 10 minutes
  405. {action_respond_info("Extruder powered down on idle timeout.")}
  406. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={120} # After pausing printing, reduce nozzle temperature to 50℃
  407. M84 E
  408. # SET_IDLE_TIMEOUT TIMEOUT=259200 # Timer duration 3 days.
  409. {% else %}
  410. TURN_OFF_HEATERS
  411. M84 E
  412. {% endif %}
  413.  
  414. [safe_z_home]
  415. home_xy_position: 141.75,97.05
  416. speed: 200
  417. z_hop: 10
  418. z_hop_speed: 5
  419.  
  420.  
  421. [gcode_macro G29]
  422. gcode:
  423. BED_MESH_CLEAR
  424. G28
  425. BED_MESH_CALIBRATE profile=6 mesh_min=10,21 mesh_max=200,220 probe_count=6 algorithm=bicubic
  426. G4 P2000
  427. G91
  428. G1 Z5 F300
  429. G90
  430. G28 Z
  431. G1 X215 Y215 F3000
  432. G1 Z0 F300
  433.  
  434. #####################################################################
  435. # Probe
  436. #####################################################################
  437.  
  438. [probe]
  439. pin:^PA11
  440. x_offset: -24.25
  441. y_offset: 20.45
  442. z_offset: 0.0
  443. speed: 10.0
  444. samples: 3
  445. samples_result: median
  446. sample_retract_dist: 3.0
  447. samples_tolerance: 0.05
  448. samples_tolerance_retries: 5
  449.  
  450. [bed_mesh]
  451. speed:500
  452. horizontal_move_z:10
  453. mesh_min:10,21
  454. mesh_max:210,211
  455. probe_count:6,6
  456. algorithm:bicubic
  457. bicubic_tension:0.2
  458. mesh_pps: 2, 2
  459. fade_start:5.0
  460. fade_end:30.0
  461.  
  462.  
  463. #####################################################################
  464. # LED Control
  465. #####################################################################
  466. [output_pin caselight]
  467. pin: PB7
  468. pwm: false
  469. shutdown_value:0
  470. value:0.0
  471.  
  472. [output_pin caselight1]
  473. pin: PC7
  474. pwm: false
  475. shutdown_value:0
  476. value:0.0
  477.  
  478. [gcode_macro FLASHLIGHT_ON]
  479. description: Turn on Hotend LEDs
  480. gcode:
  481. SET_PIN PIN=caselight VALUE=1
  482.  
  483.  
  484. [gcode_macro FLASHLIGHT_OFF]
  485. description: Turn off Hotend LEDs
  486. gcode:
  487. SET_PIN PIN=caselight VALUE=0
  488.  
  489.  
  490. [gcode_macro MODLELIGHT_ON]
  491. description: Turn on Logo LEDs
  492. gcode:
  493. SET_PIN PIN=caselight1 VALUE=1
  494.  
  495.  
  496. [gcode_macro MODLELIGHT_OFF]
  497. description: Turn off Logo LEDs
  498. gcode:
  499. SET_PIN PIN=caselight1 VALUE=0
  500.  
  501.  
  502. # [gcode_macro FLASHLIGHT_SWITCH]
  503. # description: Switch Hotend LEDs
  504. # gcode:
  505. # RUN_SHELL_COMMAND CMD=FLASHLIGHT
  506.  
  507. # [gcode_shell_command FLASHLIGHT]
  508. # command: sh /home/mks/sled2.sh
  509. # timeout: 5.
  510.  
  511. # [gcode_macro MODLELIGHT_SWITCH]
  512. # description: Switch Logo LEDs
  513. # gcode:
  514. # RUN_SHELL_COMMAND CMD=MODLELIGHT
  515.  
  516. # [gcode_shell_command MODLELIGHT]
  517. # command: sh /home/mks/sled1.sh
  518. # timeout: 5.
  519.  
  520.  
  521.  
  522. ########################################
  523. # TMC UART configuration
  524. ########################################
  525.  
  526. [tmc2209 stepper_x]
  527. uart_pin: PB9
  528. run_current: 1.0
  529. hold_current: 0.8
  530. interpolate: True
  531. stealthchop_threshold:0
  532.  
  533. [tmc2209 stepper_y]
  534. uart_pin: PD2
  535. run_current: 1.1
  536. hold_current: 0.8
  537. interpolate: True
  538. stealthchop_threshold:0
  539.  
  540. [tmc2209 stepper_z]
  541. uart_pin: PC5
  542. run_current: 0.8
  543. hold_current: 0.5
  544. interpolate: True
  545. stealthchop_threshold: 0
  546.  
  547. [tmc2209 extruder]
  548. uart_pin: PC4
  549. run_current: 0.8
  550. hold_current: 0.5
  551. interpolate: True
  552. stealthchop_threshold: 0
  553.  
  554. [mcu rpi]
  555. serial: /tmp/klipper_host_mcu
  556.  
  557. [adxl345]
  558. cs_pin: rpi:None
  559. spi_bus: spidev0.2
  560.  
  561. [resonance_tester]
  562. accel_chip: adxl345
  563. probe_points:
  564. 100, 100, 20 # an example
  565.  
  566.  
  567. [force_move]
  568. enable_force_move : true
  569.  
  570.  
  571.  
  572.  
  573. [gcode_macro M109]
  574. rename_existing: M99109
  575. gcode:
  576. #Parameters
  577. {% if 'S' in params %}
  578. {% set s = params.S|float %}
  579. M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %}
  580. {% if printer[printer.toolhead.extruder].temperature >= s-4 %}
  581. M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %}
  582. {% else %}
  583. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s-4} MAXIMUM={s+10}
  584. {% endif %}
  585. {% else %}
  586. M104 S0
  587. {% endif %}
  588.  
  589.  
  590. [display_status]
  591.  
  592.  
  593. [gcode_macro M17]
  594. gcode:
  595. {% if 'X' in params or 'Y' in params or 'Z' in params or 'E' in params %}
  596. {% if 'X' in params %}
  597. SET_STEPPER_ENABLE STEPPER=stepper_x enable=1
  598. {% endif %}
  599. {% if 'Y' in params %}
  600. SET_STEPPER_ENABLE STEPPER=stepper_y enable=1
  601. {% endif %}
  602. {% if 'Z' in params %}
  603. SET_STEPPER_ENABLE STEPPER=stepper_z enable=1
  604. {% endif %}
  605. {% if 'E' in params %}
  606. SET_STEPPER_ENABLE STEPPER=extruder enable=1
  607. {% endif %}
  608. {% else %}
  609. SET_STEPPER_ENABLE STEPPER=stepper_x enable=1
  610. SET_STEPPER_ENABLE STEPPER=stepper_y enable=1
  611. SET_STEPPER_ENABLE STEPPER=stepper_z enable=1
  612. #SET_STEPPER_ENABLE STEPPER=extruder enable=1
  613. {% endif %}
  614.  
  615.  
  616.  
  617. [gcode_macro M84]
  618. rename_existing:M84.1
  619. gcode:
  620.  
  621. {% if 'X' in params or 'Y' in params or 'Z' in params or 'E' in params %}
  622. {% if 'X' in params %}
  623. SET_STEPPER_ENABLE STEPPER=stepper_x enable=0
  624. {% endif %}
  625. {% if 'Y' in params %}
  626. SET_STEPPER_ENABLE STEPPER=stepper_y enable=0
  627. {% endif %}
  628. {% if 'Z' in params %}
  629. SET_STEPPER_ENABLE STEPPER=stepper_z enable=0
  630. {% endif %}
  631. {% if 'E' in params %}
  632. SET_STEPPER_ENABLE STEPPER=extruder enable=0
  633. {% endif %}
  634. {% else %}
  635. SET_STEPPER_ENABLE STEPPER=stepper_x enable=0
  636. SET_STEPPER_ENABLE STEPPER=stepper_y enable=0
  637. SET_STEPPER_ENABLE STEPPER=stepper_z enable=0
  638. SET_STEPPER_ENABLE STEPPER=extruder enable=0
  639. {% endif %}
  640.  
  641.  
  642.  
  643. [delayed_gcode KINEMATIC_POSITION]
  644. initial_duration:3.0
  645. gcode:
  646. SET_KINEMATIC_POSITION X=110
  647. SET_KINEMATIC_POSITION Y=110
  648. SET_KINEMATIC_POSITION Z=0
  649.  
  650.  
  651. [gcode_macro M190]
  652. rename_existing: M99190
  653. gcode:
  654. {% set s = (params.S|float,120)|min %}
  655. {% if params.S is defined %}
  656. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s|int}
  657. {% if printer.heater_bed.temperature <= s-2 %}
  658. TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-2} MAXIMUM={s+10}
  659. # G4 P20000
  660. # {% else %}
  661. # G4 P10000
  662. {% endif %}
  663. {% else %}
  664. M140 S0
  665. {% endif %}
  666.  
  667. [gcode_macro M140]
  668. rename_existing: M99140
  669. gcode:
  670. {% set s = (params.S|float,120)|min %}
  671. {% if params.S is defined %}
  672. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s|int}
  673. {% else %}
  674. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0
  675. {% endif %}
  676.  
  677.  
  678.  
  679. ####################################################################
  680. ## G-code macro definition
  681. #####################################################################
  682.  
  683. [gcode_macro M205]
  684. description: Sets square corner velocity.
  685. Usage: M205 [X<velocity>] [Y<velocity>]
  686. gcode:
  687. {% set max_square_corner_velocity = 30 %}
  688. {% if 'X' in params or 'Y' in params %}
  689. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY="{(params.X|default(0)|float, params.Y|default(0)|float,max_square_corner_velocity)|min}"
  690. {% else %}
  691. SET_VELOCITY_LIMIT
  692. {% endif %}
  693.  
  694.  
  695. [gcode_macro M203]
  696. description: Sets maximum velocity.
  697. Usage: M203 [X<velocity>] [Y<velocity>]
  698. gcode:
  699. {% if 'X' in params or 'Y' in params %}
  700. {% set velocity = (params.X|default(params.Y)|float,
  701. params.Y|default(params.X)|float,500)|min %}
  702. SET_VELOCITY_LIMIT VELOCITY="{velocity}"
  703. {% else %}
  704. SET_VELOCITY_LIMIT
  705. {% endif %}
  706.  
  707.  
  708. [gcode_macro m600]
  709. description: Pauses the current print.
  710. Usage: M600 [B<beeps>] [E<pos>] [L<pos>] [R<temp>] [U<pos>] [X<pos>] [Y<pos>]
  711. [Z<pos>]
  712. gcode:
  713. PAUSE P=2{% for k in params|select("in", "BEXYZ") %}{
  714. ' '~k~'="'~params[k]~'"'}{% endfor %}
  715.  
  716.  
  717.  
  718. ################ Buzzer configuration ##################
  719. [output_pin beeper]
  720. pin: PA2
  721. pwm: true
  722. shutdown_value:0
  723. value:0.0
  724.  
  725.  
  726. [gcode_macro m300]
  727. description: Emits and audible beep.
  728. Usage: M300 [P<duration>] [S<frequency>]
  729. gcode:
  730. {% set settings = printer.configfile.settings %}
  731. {% if "output_pin beeper" in printer %}
  732. {% set P = (params.P|default(100)|int, 0)|max %}
  733. {% set S = (params.S|default(1000)|int, 10000)|min %}
  734. SET_PIN PIN=beeper VALUE={
  735. settings["output_pin beeper"].scale|default(1.0) * 0.5
  736. }{% if settings["output_pin beeper"].pwm %} CYCLE_TIME={
  737. 1.0 / S }{% endif %}
  738. G4 P{P}
  739. SET_PIN PIN=beeper VALUE=0
  740. {% else %}
  741. {action_respond_info(
  742. "M300 is disabled. To enable create an [output_pin beeper] config.")}
  743. {% endif %}
  744.  
  745.  
  746. [gcode_arcs]
  747.  
  748. #*# <---------------------- SAVE_CONFIG ---------------------->
  749. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  750. #*#
  751. #*# [bed_mesh 6]
  752. #*# version = 1
  753. #*# points =
  754. #*# -0.007500, 0.022500, 0.046250, 0.052500, 0.048750, 0.081250
  755. #*# 0.135000, 0.155000, 0.157500, 0.160000, 0.153750, 0.143750
  756. #*# 0.123750, 0.128750, 0.118750, 0.116250, 0.108750, 0.086250
  757. #*# 0.131250, 0.146250, 0.138750, 0.136250, 0.140000, 0.135000
  758. #*# 0.117500, 0.130000, 0.117500, 0.120000, 0.133750, 0.132500
  759. #*# 0.172500, 0.191250, 0.168750, 0.187500, 0.235000, 0.211250
  760. #*# tension = 0.2
  761. #*# min_x = 10.0
  762. #*# algo = bicubic
  763. #*# y_count = 6
  764. #*# mesh_y_pps = 2
  765. #*# min_y = 21.0
  766. #*# x_count = 6
  767. #*# max_y = 219.95
  768. #*# mesh_x_pps = 2
  769. #*# max_x = 200.0
  770. #*#
  771. #*# [bed_mesh 11]
  772. #*# version = 1
  773. #*# points =
  774. #*# 0.025000, 0.088750, 0.108750, 0.102500, 0.103750, 0.087500, 0.117500, 0.111250, 0.107500, 0.111250, 0.117500
  775. #*# 0.157500, 0.183750, 0.196250, 0.182500, 0.202500, 0.190000, 0.192500, 0.186250, 0.193750, 0.190000, 0.187500
  776. #*# 0.092500, 0.157500, 0.205000, 0.211250, 0.218750, 0.226250, 0.230000, 0.223750, 0.225000, 0.238750, 0.233750
  777. #*# 0.193750, 0.201250, 0.227500, 0.215000, 0.230000, 0.225000, 0.238750, 0.228750, 0.232500, 0.235000, 0.233750
  778. #*# 0.152500, 0.150000, 0.205000, 0.192500, 0.203750, 0.216250, 0.216250, 0.198750, 0.205000, 0.195000, 0.183750
  779. #*# 0.083750, 0.026250, 0.105000, 0.145000, 0.160000, 0.167500, 0.163750, 0.155000, 0.166250, 0.168750, 0.162500
  780. #*# 0.211250, 0.197500, 0.225000, 0.223750, 0.238750, 0.247500, 0.237500, 0.226250, 0.246250, 0.250000, 0.246250
  781. #*# 0.210000, 0.226250, 0.228750, 0.227500, 0.235000, 0.241250, 0.231250, 0.218750, 0.232500, 0.242500, 0.236250
  782. #*# 0.183750, 0.166250, 0.202500, 0.198750, 0.203750, 0.216250, 0.222500, 0.211250, 0.233750, 0.238750, 0.238750
  783. #*# 0.185000, 0.232500, 0.211250, 0.207500, 0.216250, 0.227500, 0.237500, 0.235000, 0.266250, 0.260000, 0.305000
  784. #*# 0.245000, 0.231250, 0.262500, 0.233750, 0.242500, 0.240000, 0.255000, 0.281250, 0.327500, 0.321250, 0.298750
  785. #*# tension = 0.2
  786. #*# min_x = 10.0
  787. #*# algo = bicubic
  788. #*# y_count = 11
  789. #*# mesh_y_pps = 2
  790. #*# min_y = 21.0
  791. #*# x_count = 11
  792. #*# max_y = 219.9
  793. #*# mesh_x_pps = 2
  794. #*# max_x = 200.0
  795. #*#
  796. #*# [bed_mesh default]
  797. #*# version = 1
  798. #*# points =
  799. #*# -0.097500, 0.050000, 0.077500, 0.080000, 0.070000, 0.202500
  800. #*# -0.072500, 0.070000, 0.125000, 0.172500, 0.130000, 0.227500
  801. #*# -0.092500, 0.037500, 0.135000, 0.155000, 0.152500, 0.310000
  802. #*# 0.062500, 0.152500, 0.252500, 0.232500, 0.257500, 0.337500
  803. #*# 0.030000, 0.120000, 0.207500, 0.190000, 0.267500, 0.305000
  804. #*# -0.100000, 0.107500, 0.132500, 0.130000, 0.225000, 0.385000
  805. #*# tension = 0.2
  806. #*# min_x = 10.0
  807. #*# algo = lagrange
  808. #*# y_count = 6
  809. #*# mesh_y_pps = 2
  810. #*# min_y = 21.0
  811. #*# x_count = 6
  812. #*# max_y = 211.0
  813. #*# mesh_x_pps = 2
  814. #*# max_x = 210.0
  815.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement