Advertisement
Guest User

Klipper with dual X carriage

a guest
Mar 15th, 2021
7,419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 45.94 KB | None | 0 0
  1. # This file contains common pin mappings for the BigTreeTech SKR PRO.
  2. # To use this config, the firmware should be compiled for the
  3. # STM32F407 with a "32KiB bootloader".
  4.  
  5. # The "make flash" command does not work on the SKR PRO. Instead,
  6. # after running "make", copy the generated "out/klipper.bin" file to a
  7. # file named "firmware.bin" on an SD card and then restart the SKR PRO
  8. # with that SD card.
  9.  
  10. # See docs/Config_Reference.md for a description of parameters.
  11.  
  12. [stepper_x]
  13. step_pin: PE9
  14. dir_pin: PF1
  15. enable_pin: !PF2
  16. endstop_pin: !PB10
  17. step_distance: .0125 # 16 step 0.0125 # 32 step  0.00625 #0.00078125  256step
  18. position_max: 228
  19. homing_speed: 50
  20. position_endstop = -9
  21. position_min = -9
  22.  
  23. [tmc2209 stepper_x]
  24. uart_pin: PC13
  25. microsteps: 16
  26. run_current: 0.910
  27. hold_current: 0.500
  28. stealthchop_threshold: 250
  29.  
  30. [dual_carriage]
  31. step_pin: PD13
  32. dir_pin: PG9
  33. enable_pin: !PF0
  34. endstop_pin: !PE15
  35. axis: x
  36. position_max: 260.84
  37. homing_speed: 50
  38. position_endstop = 260.84
  39. position_min = 24
  40. step_distance: 0.0125
  41.  
  42. [tmc2209 dual_carriage]
  43. uart_pin: PD6
  44. microsteps: 16
  45. run_current: 0.910
  46. hold_current: 0.500
  47. stealthchop_threshold: 250
  48.  
  49. [stepper_y]
  50. step_pin: PE11
  51. dir_pin: PE8
  52. enable_pin: !PD7
  53. endstop_pin: PE12
  54. step_distance: 0.0125
  55. position_max: 240
  56. homing_speed: 70
  57. position_endstop = -13
  58. position_min = -13
  59.  
  60. [tmc2209 stepper_y]
  61. uart_pin: PE3
  62. microsteps: 16
  63. run_current: 0.910
  64. hold_current: 0.500
  65. stealthchop_threshold: 250
  66.  
  67. [stepper_z]
  68. step_pin: PE13
  69. dir_pin: !PC2
  70. enable_pin: !PC0
  71. endstop_pin: PG8
  72. step_distance: .0025
  73. #position_endstop: 0.0
  74. position_min: -1.0
  75. position_max: 250
  76. endstop_pin: probe:z_virtual_endstop
  77. #endstop_pin: ^PC2
  78. homing_speed: 5
  79.  
  80.  
  81. [tmc2209 stepper_z]
  82. uart_pin: PE1
  83. microsteps: 16
  84. run_current: 0.9
  85. hold_current: 0.500
  86. stealthchop_threshold: 40
  87.  
  88. #[safe_z_home]
  89. #home_xy_position: 100,100 # Change coordinates to the center of your print bed
  90. #speed: 100
  91. #z_hop: 10                 # Move up 10mm
  92. #z_hop_speed: 5
  93.  
  94. [extruder]
  95. step_pin: PD15
  96. dir_pin: PE7  
  97. enable_pin: !PA3
  98. heater_pin: PB1 # Heat0
  99. sensor_pin: PF4 # T1 Header   ----- AZ bude osazeny !!!
  100.  
  101. step_distance: 0.002322 # 16 step 0.002322 # 32 step 0.001161
  102. nozzle_diameter: 0.400
  103. #   Diameter of the nozzle orifice (in mm). This parameter must be
  104. #   provided.
  105. filament_diameter: 1.75
  106. #   The nominal diameter of the raw filament (in mm) as it enters the
  107. #   extruder. This parameter must be provided.
  108. sensor_type: ATC Semitec 104GT-2
  109. #   Type of sensor - common thermistors are "EPCOS 100K B57560G104F",
  110. #   "ATC Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K
  111. #   135-104LAG-J01", and "NTC 100K MGB18-104F39050L32". See the
  112. #   example-extras.cfg file for other sensors. This parameter must be
  113. #   provided.
  114. #control: pid
  115. max_extrude_only_distance: 150.0
  116. pullup_resistor: 4700
  117. #   The resistance (in ohms) of the pullup attached to the thermistor.
  118. #   This parameter is only valid when the sensor is a thermistor. The
  119. #   default is 4700 ohms.
  120. inline_resistor: 100
  121. #   The resistance (in ohms) of an extra (not heat varying) resistor
  122. #   that is placed inline with the thermistor. It is rare to set this.
  123. #   This parameter is only valid when the sensor is a thermistor. The
  124. #   default is 0 ohms.
  125. pressure_advance: 0.061 # petg 240
  126. # 0.04 PLA
  127. # 0.094 PETG
  128. #   The amount of raw filament to push into the extruder during
  129. #   extruder acceleration. An equal amount of filament is retracted
  130. #   during deceleration. It is measured in millimeters per
  131. #   millimeter/second. The default is 0, which disables pressure
  132. #   advance.
  133. pressure_advance_smooth_time: 0.100
  134. #   A time range (in seconds) to use when calculating the average
  135. #   extruder velocity for pressure advance. A larger value results in
  136. #   smoother extruder movements. This parameter may not exceed 200ms.
  137. #   This setting only applies if pressure_advance is non-zero. The
  138. #   default is 0.040 (40 milliseconds).
  139.  
  140. # pid_Kp=19.142 pid_Ki=0.931 pid_Kd=98.341
  141. #pid_Kp: 19.142
  142. #pid_Ki: 0.931
  143. #pid_Kd: 98.341
  144. min_temp: -273.15 ###10
  145. max_temp: 300 ##300
  146.  
  147. max_extrude_cross_section: 1.32
  148. #   Maximum area (in mm^2) of an extrusion cross section (eg,
  149. #   extrusion width multiplied by layer height). This setting prevents
  150. #   excessive amounts of extrusion during relatively small XY moves.
  151. #   If a move requests an extrusion rate that would exceed this value
  152. #   it will cause an error to be returned. The default is: 4.0 *
  153. #   nozzle_diameter^2
  154.  
  155. min_extrude_temp: 80
  156. #   The minimum temperature (in Celsius) at which extruder move
  157. #   commands may be issued. The default is 170 Celsius.
  158.  
  159. #pwm_cycle_time: 0.150
  160. #   Time in seconds for each software PWM cycle of the heater. It is
  161. #   not recommended to set this unless there is an electrical
  162. #   requirement to switch the heater faster than 10 times a second.
  163. #   The default is 0.100 seconds.
  164. #max_extrude_only_velocity:
  165. #max_extrude_only_accel:
  166. #   Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the
  167. #   extruder motor for retractions and extrude-only moves. These
  168. #   settings do not have any impact on normal printing moves. If not
  169. #   specified then they are calculated to match the limit an XY
  170. #   printing move with a cross section of 4.0*nozzle_diameter^2 would
  171. #   have.
  172.  
  173. [tmc2209 extruder]
  174. uart_pin: PD1
  175. microsteps: 16
  176. run_current: 0.600
  177. hold_current: 0.300
  178. stealthchop_threshold: 60
  179. #   The velocity (in mm/s) to set the "stealthChop" threshold to. When
  180. #   set, "stealthChop" mode will be enabled if the stepper motor
  181. #   velocity is below this value. The default is 0, which disables
  182. #   "stealthChop" mode.
  183.  
  184. # Helper script to park the carriage (called from T0 and T1 macros)
  185. [gcode_macro PARK_extruder]
  186. gcode:
  187.    SAVE_GCODE_STATE NAME=park0
  188.     G90
  189.     G1 X-7 F20000
  190.     RESTORE_GCODE_STATE NAME=park0
  191.  
  192. # Activate the primary extruder
  193. [gcode_macro T0]
  194. gcode:
  195.    M117 Carriage 1
  196.     PARK_{printer.toolhead.extruder}
  197.     ACTIVATE_EXTRUDER EXTRUDER=extruder
  198.     SET_DUAL_CARRIAGE CARRIAGE=0
  199.     SET_GCODE_OFFSET Y=0 Z=0
  200.    
  201. [heater_fan extruder_fan]
  202. pin: PD2
  203. max_power: 1.0
  204. shutdown_speed: 1.0
  205. #cycle_time:
  206. #hardware_pwm:
  207. kick_start_time: 0.2
  208. #off_below:
  209. #   See the "fan" section for a description of the above parameters.
  210. heater: extruder
  211. #   Name of the config section defining the heater that this fan is
  212. #   associated with. If a comma separated list of heater names is
  213. #   provided here, then the fan will be enabled when any of the given
  214. #   heaters are enabled. The default is "extruder".
  215. #heater_temp: 50.0
  216. #   A temperature (in Celsius) that the heater must drop below before
  217. #   the fan is disabled. The default is 50 Celsius.
  218. fan_speed: 0.4
  219. #   The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  220. #   will be set to when its associated heater is enabled. The default
  221. #   is 1.0
  222.  
  223. [extruder1]
  224. dir_pin: PA0
  225. enable_pin: !PC3
  226. step_pin: PE14
  227. heater_pin: PD14 # Heat2
  228. sensor_pin: PF5 # T3
  229. step_distance: 0.0023702976
  230. nozzle_diameter: 0.400
  231. #   Diameter of the nozzle orifice (in mm). This parameter must be
  232. #   provided.
  233. filament_diameter: 1.75
  234. #   The nominal diameter of the raw filament (in mm) as it enters the
  235. #   extruder. This parameter must be provided.
  236. sensor_type: ATC Semitec 104GT-2
  237. #   Type of sensor - common thermistors are "EPCOS 100K B57560G104F",
  238. #   "ATC Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K
  239. #   135-104LAG-J01", and "NTC 100K MGB18-104F39050L32". See the
  240. #   example-extras.cfg file for other sensors. This parameter must be
  241. #   provided.
  242. #control: pid
  243. max_extrude_only_distance: 150.0
  244. pullup_resistor: 4700
  245. #   The resistance (in ohms) of the pullup attached to the thermistor.
  246. #   This parameter is only valid when the sensor is a thermistor. The
  247. #   default is 4700 ohms.
  248. inline_resistor: 100
  249. #   The resistance (in ohms) of an extra (not heat varying) resistor
  250. #   that is placed inline with the thermistor. It is rare to set this.
  251. #   This parameter is only valid when the sensor is a thermistor. The
  252. #   default is 0 ohms.
  253. pressure_advance: 0.061 # petg 240
  254. # 0.04 PLA
  255. # 0.094 PETG
  256. #   The amount of raw filament to push into the extruder during
  257. #   extruder acceleration. An equal amount of filament is retracted
  258. #   during deceleration. It is measured in millimeters per
  259. #   millimeter/second. The default is 0, which disables pressure
  260. #   advance.
  261. pressure_advance_smooth_time: 0.100
  262. #   A time range (in seconds) to use when calculating the average
  263. #   extruder velocity for pressure advance. A larger value results in
  264. #   smoother extruder movements. This parameter may not exceed 200ms.
  265. #   This setting only applies if pressure_advance is non-zero. The
  266. #   default is 0.040 (40 milliseconds).
  267. min_temp: -270
  268. max_temp: 300
  269. max_extrude_cross_section: 1.32
  270. #   Maximum area (in mm^2) of an extrusion cross section (eg,
  271. #   extrusion width multiplied by layer height). This setting prevents
  272. #   excessive amounts of extrusion during relatively small XY moves.
  273. #   If a move requests an extrusion rate that would exceed this value
  274. #   it will cause an error to be returned. The default is: 4.0 *
  275. #   nozzle_diameter^2
  276. min_extrude_temp: 80
  277. #   The minimum temperature (in Celsius) at which extruder move
  278. #   commands may be issued. The default is 170 Celsius.
  279. #pwm_cycle_time: 0.150
  280. #   Time in seconds for each software PWM cycle of the heater. It is
  281. #   not recommended to set this unless there is an electrical
  282. #   requirement to switch the heater faster than 10 times a second.
  283. #   The default is 0.100 seconds.
  284. #max_extrude_only_velocity:
  285. #max_extrude_only_accel:
  286. #   Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the
  287. #   extruder motor for retractions and extrude-only moves. These
  288. #   settings do not have any impact on normal printing moves. If not
  289. #   specified then they are calculated to match the limit an XY
  290. #   printing move with a cross section of 4.0*nozzle_diameter^2 would
  291. #   have.
  292.  
  293. [tmc2209 extruder1]
  294. uart_pin: PD4
  295. microsteps: 16
  296. run_current: 0.600
  297. hold_current: 0.400
  298. stealthchop_threshold: 60
  299. #   The velocity (in mm/s) to set the "stealthChop" threshold to. When
  300. #   set, "stealthChop" mode will be enabled if the stepper motor
  301. #   velocity is below this value. The default is 0, which disables
  302. #   "stealthChop" mode.
  303.  
  304. [gcode_macro PARK_extruder1]
  305. gcode:
  306.    SAVE_GCODE_STATE NAME=park1
  307.     G90
  308.     G1 X257 F20000
  309.     RESTORE_GCODE_STATE NAME=park1
  310.  
  311. [gcode_macro T1]
  312. default_parameter_heater_active: 0
  313. gcode:
  314.    M117 Carriage 2
  315.     PARK_{printer.toolhead.extruder}
  316.     ACTIVATE_EXTRUDER EXTRUDER=extruder1
  317.     SET_DUAL_CARRIAGE CARRIAGE=1
  318.     SET_GCODE_OFFSET Y=-0.11 Z=0.25
  319.     {%- if printer.extruder1.target == 0 and printer["gcode_macro START_PRINT"].EXTRUDER1_TEMP-%}
  320.         ; Set extruder temperature and wait: M109 [T<index>] S<temperature>
  321.         {printer["gcode_macro START_PRINT"].extruder1_temp}
  322.         M109 T1 S{printer["gcode_macro START_PRINT"].extruder1_temp}
  323.         SET_GCODE_VARIABLE MACRO=T1 VARIABLE=heater_active VALUE=1
  324.     {%- endif -%}
  325.    
  326. [fan_generic extruder1_fan]
  327. pin: PE5
  328. #cycle_time: 0.005
  329. #   The amount of time (in seconds) for each PWM power cycle to the
  330. #   fan. It is recommended this be 10 milliseconds or greater when
  331. #   using software based PWM. The default is 0.010 seconds.
  332.  
  333. kick_start_time: 0.2
  334. #   Time (in seconds) to run the fan at full speed when either first
  335. #   enabling or increasing it by more than 50% (helps get the fan spinning).
  336. #   The default is 0.100 seconds.
  337. off_below: 0.12
  338. #   The minimum input speed which will power the fan (expressed as a
  339. #   value from 0.0 to 1.0). When a speed lower than off_below is
  340. #   requested the fan will instead be turned off. This setting may be
  341. #   used to prevent fan stalls and to ensure kick starts are
  342. #   effective. The default is 0.0.
  343. #
  344. #   This setting should be recalibrated whenever max_power is adjusted.
  345. #   To calibrate this setting, start with off_below set to 0.0 and the
  346. #   fan spinning. Gradually lower the fan speed to determine the lowest
  347. #   input speed which reliably drives the fan without stalls. Set
  348. #   off_below to the duty cycle corresponding to this value (for
  349. #   example, 12% -> 0.12) or slightly higher.
  350.  
  351.  
  352. [heater_bed]
  353. heater_pin: PD12
  354. sensor_pin: PF3 # T0
  355. sensor_type: EPCOS 100K B57560G104F
  356. #   Type of sensor - common thermistors are "EPCOS 100K B57560G104F",
  357. #   "ATC Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K
  358. #   135-104LAG-J01", and "NTC 100K MGB18-104F39050L32". See the
  359. #   example-extras.cfg file for other sensors. This parameter must be
  360. #   provided.
  361. # PID parameters: pid_Kp=65.718 pid_Ki=0.421 pid_Kd=2563.017
  362. #control: pid
  363. #pid_Kp: 65.718
  364. #pid_Ki: 0.421
  365. #pid_Kd: 2563.017
  366. min_temp: 0
  367. max_temp: 130
  368.  
  369. [fan]
  370. pin: PC8
  371. #cycle_time: 0.005
  372. #   The amount of time (in seconds) for each PWM power cycle to the
  373. #   fan. It is recommended this be 10 milliseconds or greater when
  374. #   using software based PWM. The default is 0.010 seconds.
  375.  
  376. kick_start_time: 0.2
  377. #   Time (in seconds) to run the fan at full speed when either first
  378. #   enabling or increasing it by more than 50% (helps get the fan spinning).
  379. #   The default is 0.100 seconds.
  380. off_below: 0.12
  381. #   The minimum input speed which will power the fan (expressed as a
  382. #   value from 0.0 to 1.0). When a speed lower than off_below is
  383. #   requested the fan will instead be turned off. This setting may be
  384. #   used to prevent fan stalls and to ensure kick starts are
  385. #   effective. The default is 0.0.
  386. #
  387. #   This setting should be recalibrated whenever max_power is adjusted.
  388. #   To calibrate this setting, start with off_below set to 0.0 and the
  389. #   fan spinning. Gradually lower the fan speed to determine the lowest
  390. #   input speed which reliably drives the fan without stalls. Set
  391. #   off_below to the duty cycle corresponding to this value (for
  392. #   example, 12% -> 0.12) or slightly higher.
  393.  
  394. [heater_fan fan_heater]
  395. pin: PE6
  396. max_power: 1
  397. shutdown_speed: 1
  398. #cycle_time: 0.005
  399. #hardware_pwm:
  400. kick_start_time: 0.2
  401. off_below: 0.12
  402. #   See the "fan" section for a description of the above parameters.
  403. heater: extruder, extruder1
  404. #   Name of the config section defining the heater that this fan is
  405. #   associated with. If a comma separated list of heater names is
  406. #   provided here, then the fan will be enabled when any of the given
  407. #   heaters are enabled. The default is "extruder".
  408. heater_temp: 50.0
  409. #   A temperature (in Celsius) that the heater must drop below before
  410. #   the fan is disabled. The default is 50 Celsius.
  411. fan_speed: 0.4
  412. #   The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  413. #   will be set to when its associated heater is enabled. The default
  414. #   is 1.0
  415.  
  416. [mcu]
  417. serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_3D003C001750563142333720-if00
  418. baud: 250000
  419.  
  420. [printer]
  421. kinematics: cartesian
  422. max_velocity: 550
  423. max_accel: 5000
  424. ;max_accel: 7000 # klipper ringing test
  425. max_accel_to_decel: 5000
  426. ;max_accel_to_decel: 7000 # klipper ringing test
  427. max_z_velocity: 50 # 80
  428. max_z_accel: 140 # 250
  429. square_corner_velocity: 5.0
  430. #   The maximum velocity (in mm/s) that the toolhead may travel a 90
  431. #   degree corner at. A non-zero value can reduce changes in extruder
  432. #   flow rates by enabling instantaneous velocity changes of the
  433. #   toolhead during cornering. This value configures the internal
  434. #   centripetal velocity cornering algorithm; corners with angles
  435. #   larger than 90 degrees will have a higher cornering velocity while
  436. #   corners with angles less than 90 degrees will have a lower
  437. #   cornering velocity. If this is set to zero then the toolhead will
  438. #   decelerate to zero at each corner. The default is 5mm/s.
  439.  
  440. #[static_digital_output usb_pullup_enable]
  441. #pins: !PC13
  442.  
  443. [board_pins]
  444. aliases:
  445.    # EXP1 header
  446.     EXP1_1=PG4, EXP1_3=PD11, EXP1_5=PG2, EXP1_7=PG6, EXP1_9=<GND>,
  447.     EXP1_2=PA8, EXP1_4=PD10, EXP1_6=PG3, EXP1_8=PG7, EXP1_10=<5V>,
  448.     # EXP2 header
  449.     EXP2_1=PB14, EXP2_3=PG10, EXP2_5=PF11, EXP2_7=PF12,  EXP2_9=<GND>,
  450.     EXP2_2=PB13, EXP2_4=PB12, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=PF13
  451.     # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
  452.  
  453. [bltouch]
  454. sensor_pin: ^PA1
  455. control_pin: PA2
  456. #z_offset: 2.2
  457. x_offset: -2
  458. y_offset: -26
  459. speed: 10.0
  460. pin_move_time: 0.675
  461. #   The amount of time (in seconds) to wait for the BLTouch pin to
  462. #   move up or down. The default is 0.675 seconds.
  463. pin_up_touch_mode_reports_triggered: True
  464. #   Set if the BLTouch consistently reports a "triggered" state after the #   commands "pin_up" followed by "touch_mode". This should be True for a genuine #   BLTouch; some BLTouch clones may require False. The default is True.
  465. pin_up_reports_not_triggered: True
  466. #   Set if the BLTouch consistently reports the probe in a "not triggered"
  467. #   state after a successful "pin_up" command. This should be True for a genuine
  468. #   BLTouch; some BLTouch clones may require False.  The default is True.
  469. lift_speed: 20 #80.0
  470. #   Speed (in mm/s) of the Z axis when lifting the probe between
  471. #   samples. The default is to use the same value as the 'speed'
  472. #   parameter.
  473. samples: 3
  474. #   The number of times to probe each point. The probed z-values will
  475. #   be averaged. The default is to probe 1 time.
  476. samples_result: median
  477. #   The calculation method when sampling more than once - either
  478. #   "median" or "average". The default is average.
  479. samples_tolerance: 0.015
  480. #   The maximum Z distance (in mm) that a sample may differ from other
  481. #   samples. If this tolerance is exceeded then either an error is
  482. #   reported or the attempt is restarted (see
  483. #   samples_tolerance_retries). The default is 0.100mm.
  484. samples_tolerance_retries: 8
  485. #   The number of times to retry if a sample is found that exceeds
  486. #   samples_tolerance. On a retry, all current samples are discarded
  487. #   and the probe attempt is restarted. If a valid set of samples are
  488. #   not obtained in the given number of retries then an error is
  489. #   reported. The default is zero which causes an error to be reported
  490. #   on the first sample that exceeds samples_tolerance.
  491. # set this to false if probe does not support it
  492. stow_on_each_sample: False
  493. #   If set to False, intermediate STOW/DEPLOY sequences on certain
  494. #   operations that use the probe multiple times will be omitted.
  495. sample_retract_dist: 0.8
  496. #   The distance (in mm) to lift the toolhead between each sample (if
  497. #   sampling more than once). The default is 2mm.
  498.  
  499. # See the sample-lcd.cfg file for definitions of common LCD displays.
  500.  
  501. [display]
  502. lcd_type: st7920
  503. cs_pin: EXP1_7
  504. sclk_pin: EXP1_6
  505. sid_pin: EXP1_8
  506. encoder_pins: ^EXP1_5, ^EXP1_3
  507. click_pin: ^!EXP1_2
  508. #kill_pin: ^!EXP2_8
  509.  
  510.  
  511. [bed_mesh]
  512. speed: 1000
  513. #   The speed (in mm/s) of non-probing moves during the
  514. #   calibration. The default is 50.
  515. horizontal_move_z: 5
  516. #   The height (in mm) that the head should be commanded to move to
  517. #   just prior to starting a probe operation. The default is 5.
  518. #mesh_radius:
  519. #   Defines the radius of the mesh to probe for round beds.  Note that the
  520. #   radius is relative to the coordinate specified by the mesh_origin option.
  521. #   This parameter must be provided for round beds and omitted for rectangular
  522. #   beds.
  523. #mesh_origin:
  524. #   Defines the center x,y coordinate of the mesh for round beds.  This
  525. #   coordinate is relative to the probe's location.  It may be useful
  526. #   to adjust the mesh_origin in an effort to maximize the size of the
  527. #   mesh radius.  Default is 0,0.  This parameter must be omitted for
  528. #   rectangular beds.
  529. mesh_min: 5,5
  530. #   Defines the minimum x,y coodinate of the mesh for rectangular beds.  This
  531. #   coordinate is relative to the probe's location. This will be the first
  532. #   point probed, nearest to the origin. This parameter must be provided for
  533. #   rectangular beds.
  534. mesh_max: 226, 214  #228, 240 max, -2,-26 offse
  535. #   Defines the maximum x,y coordinate of the mesh for rectangular beds.
  536. #   Adheres to the same principle as mesh_min, however this will be the
  537. #   furthest point probed from the bed's origin. This parameter must be
  538. #   provided for rectangular beds.
  539. probe_count: 8,8
  540. #   For rectangular beds, this is a comma separate pair of integer
  541. #   values (X,Y) defining the number of points to probe along each axis.
  542. #   A single value is also valid, in which case that value will be applied
  543. #   to both axes.  Default is 3,3.
  544. #round_probe_count: 5
  545. #   For round beds, this integer value defines the maximum number of
  546. #   points to probe along each axis. This value must be an odd number.
  547. #   Default is 5.
  548. fade_start: 1.0
  549. #   The gcode z position in which to start phasing out z-adjustment
  550. #   when fade is enabled.  Default is 1.0.
  551. fade_end: 10.0
  552. #   The gcode z position in which phasing out completes.  When set
  553. #   to a value below fade_start, fade is disabled. It should be
  554. #   noted that fade may add unwanted scaling along the z-axis of a
  555. #   print.  If a user wishes to enable fade, a value of 10.0 is
  556. #   recommended. Default is 0.0, which disables fade.
  557. #fade_target:
  558. #   The z position in which fade should converge. When this value is set
  559. #   to a non-zero value it must be within the range of z-values in the mesh.
  560. #   Users that wish to converge to the z homing position should set this to 0.
  561. #   Default is the average z value of the mesh.
  562. #split_delta_z: .025
  563. #   The amount of Z difference (in mm) along a move that will
  564. #   trigger a split. Default is .025.
  565. #move_check_distance: 5.0
  566. #   The distance (in mm) along a move to check for split_delta_z.
  567. #   This is also the minimum length that a move can be split. Default
  568. #   is 5.0.
  569. mesh_pps: 2,2
  570. #   A comma separated pair of integers (X,Y) defining the number of
  571. #   points per segment to interpolate in the mesh along each axis. A
  572. #   "segment" can be defined as the space between each probed
  573. #   point. The user may enter a single value which will be applied
  574. #   to both axes.  Default is 2,2.
  575. algorithm: bicubic
  576. #   The interpolation algorithm to use. May be either "lagrange"
  577. #   or "bicubic". This option will not affect 3x3 grids, which
  578. #   are forced to use lagrange sampling.  Default is lagrange.
  579. bicubic_tension: .2
  580. #   When using the bicubic algorithm the tension parameter above
  581. #   may be applied to change the amount of slope interpolated.
  582. #   Larger numbers will increase the amount of slope, which
  583. #   results in more curvature in the mesh. Default is .2.
  584. #relative_reference_index:
  585. #   A point index in the mesh to reference all z values to. Enabling
  586. #   this parameter produces a mesh relative to the probed z position
  587. #   at the provided index.
  588.  
  589. [gcode_macro SAVE_FAN_TEMPS]
  590. variable_extruder_temp: 0
  591. variable_bed_temp: 0
  592. variable_fan_speed: 0
  593. gcode:
  594.  # Save target temperature to extruder_temp variable
  595.     SET_GCODE_VARIABLE MACRO=SAVE_FAN_TEMPS VARIABLE=bed_temp VALUE={printer.heater_bed.target}
  596.     SET_GCODE_VARIABLE MACRO=SAVE_FAN_TEMPS VARIABLE=extruder_temp VALUE={printer.extruder.target}
  597.     SET_GCODE_VARIABLE MACRO=SAVE_FAN_TEMPS VARIABLE=fan_speed VALUE={printer.fan.speed * 255.0}
  598.   M104 S0
  599.   M140 S0
  600.   M106 S0
  601.  
  602. [gcode_macro RESTORE_FAN_TEMPS]
  603. gcode:
  604.    M140 S{printer["gcode_macro SAVE_FAN_TEMPS"].bed_temp}
  605.     M104 S{printer["gcode_macro SAVE_FAN_TEMPS"].extruder_temp}
  606.     M106 S{printer["gcode_macro SAVE_FAN_TEMPS"].fan_speed}
  607.  
  608. # Z-safe homing that (1) moves the probe up 15mm (2) home XY (3) move to center of bed (4) home Z
  609. # Edit the X166 Y120 for your own center of bed
  610. [homing_override]
  611. set_position_z: 5
  612. axes: z
  613. gcode:
  614.    # turn off heaters for accurate measurements
  615.     G90 ; Uncomment these 2 lines to blindly lift the Z 2mm at start
  616.     G1 Z10 F600 ; Move Z up a bit to prevent scratching
  617.     G28 X0 Y0
  618.     T0
  619.     G1 X115 Y115 F5000
  620.    
  621.     SAVE_FAN_TEMPS
  622.     G28 Z0
  623.     RESTORE_FAN_TEMPS
  624.     G1 Z10 F600
  625.  
  626. # Custom G29 that does (1) home all (2) get bed mesh (3) move nozzle to corner so it doesnt ooze on the bed while heating up.
  627. [gcode_macro G29]
  628. gcode:
  629.    SET_CASE_LIGHT VAL=0
  630.     BED_MESH_CALIBRATE
  631.     G0 X110 Y110 Z10 F3000
  632.  
  633. [gcode_macro SET_CASE_LIGHT]
  634. default_parameter_VAL: 255.0
  635. gcode:
  636.    SET_PIN PIN=case_light_pin VALUE={VAL|float / 255.0}
  637.  
  638. [gcode_macro SET_LASER]
  639. default_parameter_S: 0
  640. gcode:
  641.  SET_PIN PIN=laser_pin VALUE={S|float / 255.0}
  642.  
  643. [gcode_macro ACTIVATE_LASER]
  644. variable_max_x: 0
  645. gcode:
  646.  SET_GCODE_VARIABLE MACRO=ACTIVATE_LASER VARIABLE=max_x VALUE={ printer.toolhead.axis_maximum.x }
  647.   #{% set printer.toolhead.axis_maximum.x=190 %}
  648.   SET_LASER S=0
  649.  
  650. [gcode_macro DEACTIVATE_LASER]
  651. gcode:
  652.  #{ set printer.toolhead.axis_maximum.x = printer["gcode_macro ACTIVATE_LASER"].max_x }
  653.   SET_LASER S=0  
  654.  
  655. [firmware_retraction]
  656. retract_length: 2.8
  657. #   The length of filament (in mm) to retract when G10 is activated, and to
  658. #   unretract when G11 is activated (but see unretract_extra_length below).
  659. #   The default is 0 mm.
  660. retract_speed: 70
  661. #   The speed of retraction, in mm/s. The default is 20 mm/s.
  662. #unretract_extra_length: 0
  663. #   The length (in mm) of *additional* filament to add when unretracting.
  664. unretract_speed: 50
  665. #   The speed of unretraction, in mm/s. The default is 10 mm/s.
  666.    
  667.    
  668. # This adds a screw tilt adjust command that probes certain points on the bed and recommends new bed screw positions (turn clockwise this much etc)
  669. [screws_tilt_adjust]
  670. screw1: 50,50
  671. screw1_name: Front left screw
  672. screw2: 50,215
  673. screw2_name: Rear left screw
  674. screw3: 215,50
  675. screw3_name: Front right screw
  676. screw4: 215,215
  677. screw4_name: Rear right screw
  678. horizontal_move_z: 10
  679. speed: 250
  680. screw_thread: CW-M3
  681.  
  682. [gcode_macro M108]
  683. gcode:
  684.    TURN_OFF_HEATERS
  685.    
  686. # This adds a bed screws adjust GCode, that moves the nozzle around for you so you can paper adjust.
  687. [bed_screws]
  688. screw1: 31,37
  689. screw1_name: Front left screw
  690. screw2: 31,208
  691. screw2_name: Rear left screw
  692. screw3: 201,208
  693. screw3_name: Rear right screw
  694. screw4: 201,37
  695. screw4_name: Front right screw
  696.  
  697. # This adds pause/resume support
  698. [pause_resume]
  699.  
  700. # This adds the 'respond' G-Code that you can use to send commands back to OctoPrint
  701. [respond]
  702. default_type: echo
  703.  
  704. # Run-time configurable output pins (one may define any number of
  705. # sections with an "output_pin" prefix). Pins configured here will be
  706. # setup as output pins and one may modify them at run-time using
  707. # "SET_PIN PIN=my_pin VALUE=.1" type extended g-code commands.
  708. [output_pin case_light_pin]
  709. pin: PD5
  710. #   The pin to configure as an output. This parameter must be
  711. #   provided.
  712. pwm: True
  713. #   Set if the output pin should be capable of pulse-width-modulation.
  714. #   If this is true, the value fields should be between 0 and 1; if it
  715. #   is false the value fields should be either 0 or 1. The default is
  716. #   False.
  717. #static_value: 0.5
  718. #   If this is set, then the pin is assigned to this value at startup
  719. #   and the pin can not be changed during runtime. A static pin uses
  720. #   slightly less ram in the micro-controller. The default is to use
  721. #   runtime configuration of pins.
  722. value: 0.5
  723. #   The value to initially set the pin to during MCU configuration.
  724. #   The default is 0 (for low voltage).
  725. #shutdown_value:
  726. #   The value to set the pin to on an MCU shutdown event. The default
  727. #   is 0 (for low voltage).
  728. cycle_time: 0.005
  729. #   The amount of time (in seconds) per PWM cycle. It is recommended
  730. #   this be 10 milliseconds or greater when using software based PWM.
  731. #   The default is 0.100 seconds for pwm pins.
  732. #hardware_pwm: False
  733. #   Enable this to use hardware PWM instead of software PWM. When
  734. #   using hardware PWM the actual cycle time is constrained by the
  735. #   implementation and may be significantly different than the
  736. #   requested cycle_time. The default is False.
  737. # scale: 255.0
  738. #   This parameter can be used to alter how the 'value' and
  739. #   'shutdown_value' parameters are interpreted for pwm pins. If
  740. #   provided, then the 'value' parameter should be between 0.0 and
  741. #   'scale'. This may be useful when configuring a PWM pin that
  742. #   controls a stepper voltage reference. The 'scale' can be set to
  743. #   the equivalent stepper amperage if the PWM were fully enabled, and
  744. #   then the 'value' parameter can be specified using the desired
  745. #   amperage for the stepper. The default is to not scale the 'value'
  746. #   parameter.
  747.  
  748. [output_pin laser_pin]
  749. pin: PE0
  750. #   The pin to configure as an output. This parameter must be
  751. #   provided.
  752. pwm: True
  753. #   Set if the output pin should be capable of pulse-width-modulation.
  754. #   If this is true, the value fields should be between 0 and 1; if it
  755. #   is false the value fields should be either 0 or 1. The default is
  756. #   False.
  757. #static_value: 0.5
  758. #   If this is set, then the pin is assigned to this value at startup
  759. #   and the pin can not be changed during runtime. A static pin uses
  760. #   slightly less ram in the micro-controller. The default is to use
  761. #   runtime configuration of pins.
  762. value: 0.0
  763. #   The value to initially set the pin to during MCU configuration.
  764. #   The default is 0 (for low voltage).
  765. shutdown_value: 0
  766. #   The value to set the pin to on an MCU shutdown event. The default
  767. #   is 0 (for low voltage).
  768. cycle_time: 0.005
  769. #   The amount of time (in seconds) per PWM cycle. It is recommended
  770. #   this be 10 milliseconds or greater when using software based PWM.
  771. #   The default is 0.100 seconds for pwm pins.
  772. #hardware_pwm: False
  773. #   Enable this to use hardware PWM instead of software PWM. When
  774. #   using hardware PWM the actual cycle time is constrained by the
  775. #   implementation and may be significantly different than the
  776. #   requested cycle_time. The default is False.
  777. # scale: 255.0
  778. #   This parameter can be used to alter how the 'value' and
  779. #   'shutdown_value' parameters are interpreted for pwm pins. If
  780. #   provided, then the 'value' parameter should be between 0.0 and
  781. #   'scale'. This may be useful when configuring a PWM pin that
  782. #   controls a stepper voltage reference. The 'scale' can be set to
  783. #   the equivalent stepper amperage if the PWM were fully enabled, and
  784. #   then the 'value' parameter can be specified using the desired
  785. #   amperage for the stepper. The default is to not scale the 'value'
  786. #   parameter.
  787.  
  788.  
  789. [gcode_macro START_PRINT]
  790. default_parameter_BED_TEMP: 60
  791. default_parameter_EXTRUDER_TEMP: 190
  792. default_parameter_RETRACTION: 1.5
  793. default_parameter_RETRACT_SPEED: 100
  794. default_parameter_UNRETRACT_SPEED: 100
  795. default_parameter_UNRETRACT_EXTRA_LENGTH: -0.2
  796. default_parameter_EXTRUDER_TEMP1: 0
  797. default_parameter_RETRACTION1: 1.5
  798. default_parameter_RETRACT_SPEED1: 100
  799. default_parameter_UNRETRACT_SPEED1: 100
  800. default_parameter_UNRETRACT_EXTRA_LENGTH1: -0.2
  801. gcode:
  802.    SET_RETRACTION RETRACT_LENGTH={RETRACTION} RETRACT_SPEED={RETRACT_SPEED} UNRETRACT_SPEED={UNRETRACT_SPEED} UNRETRACT_EXTRA_LENGTH={UNRETRACT_EXTRA_LENGTH}
  803.     M140 S{BED_TEMP} # start preheating the bed WITHOUT wait to what is set in Cura
  804.     ;M104 S170 # S150 start preheating hotend WITHOUT wait to what is set in Cura
  805.     M104 S{EXTRUDER_TEMP} # S150 start preheating hotend WITHOUT wait to what is set in Cura
  806.     SET_CASE_LIGHT VAL=255
  807.     M106 S46 # fan speed to 18 %
  808.     BLTOUCH_DEBUG COMMAND=reset
  809.    
  810.     M117 Homing
  811.     G28 #Home
  812.    
  813.     G0 X-8 Y2 Z0.3 F3000 #
  814.    
  815.     M117 Hotend Heatup
  816.     M109 S{EXTRUDER_TEMP} T0 # start heating hotend to what is set in Cura and WAIT
  817.    
  818.     M117 Preheating Bed
  819.     M190 S{BED_TEMP} # start heating the bed to what is set in Cura and WAIT
  820.  
  821.    
  822.    
  823.     M106 S46 ; fan to 18%
  824.     ; cleaning
  825.    
  826.     NOTIFY_WARN
  827.    
  828.     M117 Wipe Hotend
  829.     G90 ; ABSOLUTE COORDS    (G91 relative)
  830.     M83 ; relative extruder coords (M82 absolute)
  831.  
  832.     ;G0 X3 Y5 Z5 F2000.0 ;Move to start position
  833.  
  834.     M117 Printing prime line
  835.     M106 S200
  836.     ;G1 E7 F90
  837.     ;G1 Z0.1 F1000
  838.     ;G1 E15 Z2 F90
  839.     ;G1 Z0.9 F800
  840.     ;G1 Z5 F800
  841.    
  842.     g1 z0.05 f700
  843.     g1 x5 f1000
  844.  
  845.     ;G0 X9 Y5 F1000.0 ;Move to start position
  846.     G1 Z0.15
  847.     G1 E3 F700.0 ; fat 20mm intro line @ 0.30
  848.  
  849.     G92 E0 ;Reset Extruder
  850.     G1 X16.0 E3  F700.0 ; fat 20mm intro line @ 0.30
  851.     G1 X33.0 E1.6  F700.0 ; thin +40mm intro line @ 0.08
  852.     G1 X53.0 E3  F700.0 ; fat +40mm intro line @ 0.15
  853.     ;G1 E-0.5 F3000; retract to avoid stringing
  854.     G1 X50.5 E0 F10000.0 ; -0.5mm wipe action to avoid string
  855.     G1 X53.0 E0 F10000.0 ; +10mm intro line @ 0.00
  856.     ;G1 E1.2 F1500; de-retract
  857.     G92 E0.0 ; reset extrusion distance
  858.     ;G1 Z1
  859.     M82 ; absolute extruder coords (M82 absolute, M83 relative)
  860.     M106 S0
  861.     M117 Printing
  862.  
  863.     SET_CASE_LIGHT VAL=5
  864.  
  865. [gcode_macro END_PRINT]
  866. gcode:
  867.    G91 #Relative positioning
  868.     M83 ; relative extruder coords (M82 absolute)
  869.     G1 Z0.8 F10000 #raise Z
  870.     T0
  871.     G1 E-2 F10000 #Retract and raise Z
  872.     PARK_extruder ;
  873.    
  874.     {%- if printer["gcode_macro T1"].heater_active -%}
  875.       T1 ;
  876.       G1 E-2 F10000 #Retract and raise Z
  877.       PARK_extruder1 ;
  878.       SET_GCODE_VARIABLE MACRO=T1 VARIABLE=heater_active VALUE=0
  879.     {%- endif -%}
  880.        
  881.     G1 Z20 F700 #Raise Z more
  882.     M117 Print Ending
  883.     M400
  884.     SET_CASE_LIGHT VAL=255
  885.     M117 Print Finished
  886.  
  887.     G90 #Absolute positionning
  888.  
  889.     G0 Y150 #Present print
  890.     TURN_OFF_HEATERS
  891.     ;M106 S50 # fan speed to 100 %
  892.     M104 S0 #Turn-off hotend
  893.     M140 S0 #Turn-off bed
  894.  
  895.     M84 X Y Z E #Disable all steppers    
  896.     NOTIFY_END_PRINT
  897.    
  898.  
  899. [gcode_macro M600]
  900. gcode:
  901.    CHANGE_FILAMENT
  902.  
  903. [gcode_macro CHANGE_FILAMENT]
  904. variable_extruder_temp: 0
  905. variable_fan_speed: 0
  906.  
  907. gcode:
  908.  M117 Changing filament
  909.   M400
  910.   PAUSE
  911.   SAVE_GCODE_STATE NAME=change_filament_state
  912.  
  913.   # relative pos/extruder
  914.   M83
  915.   G91
  916.  
  917.   # retract a bit
  918.   G1 E-1 F1000
  919.   G1 Z0.6 F1500
  920.   G1 X5 Y5 F10000
  921.   G1 Z30 F700
  922.  
  923.   # wipe out
  924.   G90
  925.   G1 X-5 Y-8 F5000
  926.  
  927.   SET_CASE_LIGHT VAL=255
  928.  
  929.   # completely retract
  930.   G1 E-10 F5000
  931.   G1 E-50 F1000
  932.  
  933.   # Save target temperature to extruder_temp variable
  934.   SET_GCODE_VARIABLE MACRO=CHANGE_FILAMENT VARIABLE=extruder_temp VALUE={printer[printer.toolhead.extruder].target}
  935.   SET_GCODE_VARIABLE MACRO=CHANGE_FILAMENT VARIABLE=fan_speed VALUE={printer.fan.speed * 255.0}
  936.   # fan to 50 %
  937.   M106 S128
  938.   M400
  939.   ;M117 Wait for cooldown
  940.   ;NOTIFY_WARN  
  941.  
  942.   # Cool down to 90 deg C
  943.   ;M104 S90
  944.   M117 Change now
  945.   NOTIFY_WARN
  946.  
  947. [gcode_macro FILAMENT_CHANGED_OK]
  948. gcode:
  949.  # fan
  950.   ;M106 S50
  951.   # Restore temperature
  952.   ;M117 Restoring temperature
  953.   ;M109 S{printer["gcode_macro CHANGE_FILAMENT"].extruder_temp}
  954.  
  955.   M106 S180
  956.  
  957.   # Extrude 70mm
  958.  
  959.   M117 Loading Filament
  960.   M117 Loading 7 cm
  961.   G1 E10 F300
  962.   M400
  963.   M117 Loading 6 cm
  964.   G1 E10 F300
  965.   M400
  966.   M117 Loading 5 cm
  967.   G1 E10 F300
  968.   M400
  969.   M117 Loading 4 cm
  970.   G1 E10 F300
  971.   M400
  972.   M117 Loading 3 cm
  973.   G1 E10 F300
  974.   M400
  975.   M117 Loading 2 cm
  976.   G1 E10 F300
  977.   M400
  978.   M117 Loading 1 cm
  979.   G1 E10 F300
  980.   M400
  981.   M117 Loaded
  982.   NOTIFY_WARN
  983.  
  984. [gcode_macro CONTINUE_PRINTING]
  985. gcode:
  986.  SET_CASE_LIGHT VAL=5
  987.  
  988.   # Restore FAN
  989.   M106 S{printer["gcode_macro CHANGE_FILAMENT"].fan_speed}
  990.   RESUME VELOCITY=200
  991.   M117 Filament Changed
  992.   NOTIFY_WARN
  993.   G1 E-1.2 F1000
  994.   RESTORE_GCODE_STATE NAME=change_filament_state
  995.  
  996. ### menu Print ###
  997. [menu __main __pause_print]
  998. type: command
  999. enable: {printer.idle_timeout.state == "Printing"}
  1000. name: Change Filament
  1001. gcode:
  1002.    CHANGE_FILAMENT
  1003.  
  1004. [menu __main __resume_print]
  1005. type: command
  1006. enable: { printer.pause_resume.is_paused }
  1007. name: Resume Printing
  1008. gcode:
  1009.    CONTINUE_PRINTING
  1010.  
  1011. [menu __main __filament_load]
  1012. type: command
  1013. enable: { printer.pause_resume.is_paused }
  1014. name: Load Filament
  1015. gcode:
  1016.    FILAMENT_CHANGED_OK
  1017.  
  1018. [menu __main __control __extruderactivate0]
  1019. type: command
  1020. enable: {not printer.idle_timeout.state == "Printing"}
  1021. name: Activate T0
  1022. gcode: T0
  1023.  
  1024. [menu __main __control __extruderactivate1]
  1025. type: command
  1026. enable: {not printer.idle_timeout.state == "Printing"}
  1027. name: Activate T1
  1028. gcode: T1
  1029.  
  1030. [menu __main __bedmesh]
  1031. type: list
  1032. enable: { printer.idle_timeout.state != "Printing"}
  1033. name: Calibration
  1034.  
  1035. [menu __main __bedmesh __bedmeshcalibrate]
  1036. type: command
  1037. enable: { printer.idle_timeout.state != "Printing"}
  1038. name: Bed Mesh Calib
  1039. gcode:
  1040.   M117 Homing
  1041.   G28
  1042.   M400
  1043.   M117 Bed Mesh
  1044.   BED_MESH_CALIBRATE
  1045.   M400
  1046.   M117 Done
  1047.  
  1048. [menu __main __bedmesh __probecalibrate]
  1049. enable: { printer.idle_timeout.state != "Printing"}
  1050. type: command
  1051. name: Probe Offset Cal
  1052. gcode:
  1053.  M117 Probe Calibrate
  1054.   G28
  1055.   PROBE_CALIBRATE
  1056.  
  1057.  
  1058. [menu __main __bedmesh __test_z]
  1059. type: input
  1060. enable: {printer.idle_timeout.state != "Printing"}
  1061. name: Test Z: {['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]}
  1062. input: 6
  1063. input_min: 0
  1064. input_max: 11
  1065. input_step: 1
  1066. gcode:
  1067.    {%- if menu.event == 'long_click' -%}
  1068.         TESTZ Z={['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]}
  1069.     {%- endif -%}
  1070.  
  1071. [menu __main __bedmesh __accept]
  1072. type: command
  1073. name: Accept
  1074. gcode:
  1075.   ACCEPT
  1076.   M117 Accept
  1077.  
  1078. [menu __main __bedmesh __abort]
  1079. type: command
  1080. name: Abort
  1081. gcode:
  1082.   ABORT
  1083.   M117 Abort
  1084.  
  1085. [menu __main __bedmesh __save_config]
  1086. type: command
  1087. name: Save Config
  1088. gcode:
  1089.   SAVE_CONFIG
  1090.   M117 Config Saved
  1091.  
  1092. [menu __main __filament __width_current]
  1093. type: command
  1094. enable: {'hall_filament_width_sensor' in printer}
  1095. name: Dia: {'%.2F mm' % printer.hall_filament_width_sensor.Diameter}
  1096. index: 0
  1097.  
  1098. [menu __main __filament __raw_width_current]
  1099. type: command
  1100. enable: {'hall_filament_width_sensor' in printer}
  1101. name: Raw: {'%4.0F' % printer.hall_filament_width_sensor.Raw}
  1102. index: 1
  1103.  
  1104.  
  1105. ######################################################################
  1106. # Beeper
  1107. ######################################################################
  1108.  
  1109. # M300 : Play tone. Beeper support, as commonly found on usual LCD
  1110. # displays (i.e. RepRapDiscount 2004 Smart Controller, RepRapDiscount
  1111. # 12864 Full Graphic). This defines a custom I/O pin and a custom
  1112. # GCODE macro.  Usage:
  1113. #   M300 [P<ms>] [S<Hz>]
  1114. #   P is the tone duration, S the tone frequency.
  1115. # The frequency won't be pitch perfect.
  1116.  
  1117. [output_pin BEEPER_pin]
  1118. pin: PG4
  1119. #   Beeper pin. This parameter must be provided.
  1120. #   ar37 is the default RAMPS/MKS pin.
  1121. pwm: True
  1122. #   A piezo beeper needs a PWM signal, a DC buzzer doesn't.
  1123. value: 0
  1124. #   Silent at power on, set to 1 if active low.
  1125. shutdown_value: 0
  1126. #   Disable at emergency shutdown (no PWM would be available anyway).
  1127. cycle_time: 0.001
  1128. #   PWM frequency : 0.001 = 1ms will give a base tone of 1kHz
  1129. scale: 1000
  1130. #   PWM parameter will be in the range of (0-1000 Hz).
  1131. #   Although not pitch perfect.
  1132.  
  1133. [gcode_macro M300]
  1134. default_parameter_S: 1000
  1135. #   Use a default 1kHz tone if S is omitted.
  1136. default_parameter_P: 100
  1137. #   Use a 10ms duration is P is omitted.
  1138. gcode:
  1139.    SET_PIN PIN=BEEPER_pin VALUE={S}
  1140.     G4 P{P}
  1141.     SET_PIN PIN=BEEPER_pin VALUE=0
  1142.  
  1143. [gcode_macro NOTIFY_WARN]
  1144. gcode:
  1145.  M300 S80 P20
  1146.   M300 S80 P20
  1147.  
  1148. [gcode_macro NOTIFY_END_PRINT]
  1149. gcode:
  1150.  M300 S80 P5
  1151.   M300 S80 P1000
  1152.  
  1153. # X: 22 / 9 = 2,4444444444444444444444444444444       100 * 9 / 22 = 40,909090909090909090909090909091
  1154. # Y: 4,8 / 3 = 1,6                                    100 * 3 / 4,8 = 62,5
  1155.  
  1156. # Enables input shaping.
  1157. [input_shaper]
  1158. shaper_freq_x: 40.909090
  1159. #   A frequency (in Hz) of the input shaper for X axis. This is
  1160. #   usually a resonance frequency of X axis that the input shaper
  1161. #   should suppress. For more complex shapers, like 2- and 3-hump EI
  1162. #   input shapers, this parameter can be set from different
  1163. #   considerations. The default value is 0, which disables input
  1164. #   shaping for X axis.
  1165. shaper_freq_y: 62.5
  1166. #   A frequency (in Hz) of the input shaper for Y axis. This is
  1167. #   usually a resonance frequency of Y axis that the input shaper
  1168. #   should suppress. For more complex shapers, like 2- and 3-hump EI
  1169. #   input shapers, this parameter can be set from different
  1170. #   considerations. The default value is 0, which disables input
  1171. #   shaping for Y axis.
  1172. shaper_type: ei
  1173. #   A type of the input shaper to use for both X and Y axes. Supported
  1174. #   shapers are zv, mzv, zvd, ei, 2hump_ei, and 3hump_ei. The default
  1175. #   is mzv input shaper.
  1176. #shaper_type_x:
  1177. #shaper_type_y:
  1178. #   If shaper_type is not set, these two parameters can be used to
  1179. #   configure different input shapers for X and Y axes. The same
  1180. #   values are supported as for shaper_type parameter.
  1181. #damping_ratio_x: 0.1
  1182. #damping_ratio_y: 0.1
  1183. #   Damping ratios of vibrations of X and Y axes used by input shapers
  1184. #   to improve vibration suppression. Should not be changed without
  1185. #   some proper measurements, e.g. with an accelerometer. Default
  1186. #   value is 0.1 which is a good all-round value for most printers.
  1187.  
  1188. [virtual_sdcard]
  1189. path: /tmp/uploads/
  1190. #   The path of the local directory on the host machine to look for
  1191. #   g-code files. This is a read-only directory (sdcard file writes
  1192. #   are not supported). One may point this to OctoPrint's upload
  1193. #   directory (generally ~/.octoprint/uploads/ ). This parameter must
  1194. #   be provided.
  1195.  
  1196. [display_status]
  1197. [pause_resume]
  1198.  
  1199. #[hall_filament_width_sensor]
  1200. #adc1: PA2
  1201. #adc2: PA3
  1202. #   Analog input pins connected to the sensor. These parameters must
  1203. #   be provided.
  1204. #cal_dia1: 1.50
  1205. #cal_dia2: 2.00
  1206. #   The calibration values (in mm) for the sensors. The default is
  1207. #   1.50 for cal_dia1 and 2.00 for cal_dia2.
  1208. #raw_dia1: 15347
  1209. #raw_dia2: 15376
  1210. #   The raw calibration values for the sensors. The default is 9500
  1211. #   for raw_dia1 and 10500 for raw_dia2.
  1212. #default_nominal_filament_diameter: 1.75
  1213. #   The nominal filament diameter. This parameter must be provided.
  1214. #max_difference: 0.200
  1215. #   Maximum allowed filament diameter difference in millimeters (mm).
  1216. #   If difference between nominal filament diameter and sensor output
  1217. #   is more than +- max_difference, extrusion multiplier is set back
  1218. #   to %100. The default is 0.200.
  1219. #measurement_delay: 70
  1220. #   The distance from sensor to the melting chamber/hot-end in
  1221. #   millimeters (mm). The filament between the sensor and the hot-end
  1222. #   will be treated as the default_nominal_filament_diameter. Host
  1223. #   module works with FIFO logic. It keeps each sensor value and
  1224. #   position in an array and POP them back in correct position. This
  1225. #   parameter must be provided.
  1226. #enable: False
  1227. #   Sensor enabled or disabled after power on. The default is to
  1228. #   disable.
  1229. #measurement_interval: 10
  1230. #   The approximate distance (in mm) between sensor readings. The
  1231. #   default is 10mm.
  1232. #logging: False
  1233. #   Out diameter to terminal and klipper.log can be turn on|of by
  1234. #   command.
  1235. #min_diameter: 1.0
  1236. #   Minimal diameter for trigger virtual filament_switch_sensor.
  1237. #use_current_dia_while_delay: False
  1238. #   Use the current diameter instead of the nominal diameter while
  1239. #   the measurement delay has not run through.
  1240. #pause_on_runout: True
  1241. #runout_gcode:
  1242. #insert_gcode:
  1243. #event_delay:
  1244. #pause_delay:
  1245. #   See the "filament_switch_sensor" section for a description of the
  1246. #   above parameters.
  1247.  
  1248.  
  1249. [gcode_macro PAUSE]
  1250. rename_existing: BASE_PAUSE
  1251. default_parameter_X: 230    # edit to your preferred park position
  1252. default_parameter_Y: 230    # edit to your preferred park position
  1253. default_parameter_Z: 10     # edit to your preferred park position
  1254. default_parameter_E: 1      # edit to your preferred retract length
  1255. gcode:
  1256.    SAVE_GCODE_STATE NAME=PAUSE_state
  1257.     BASE_PAUSE
  1258.     G91
  1259.     G1 E-{E} F2100
  1260.     G1 Z{Z}
  1261.     G90
  1262.     G1 X{X} Y{Y} F6000
  1263.    
  1264. [gcode_macro RESUME]
  1265. rename_existing: BASE_RESUME
  1266. default_parameter_E: 1      # edit to your preferred retract length
  1267. gcode:
  1268.    G91
  1269.     G1 E{E} F2100
  1270.     G90
  1271.     RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
  1272.     BASE_RESUME
  1273.    
  1274. [gcode_macro CANCEL_PRINT]
  1275. rename_existing: BASE_CANCEL_PRINT
  1276. gcode:
  1277.    TURN_OFF_HEATERS
  1278.     CLEAR_PAUSE
  1279.     SDCARD_RESET_FILE
  1280.     BASE_CANCEL_PRINT
  1281.  
  1282. [gcode_macro CANCEL_PRINT]
  1283. rename_existing: ORIG_CANCEL_PRINT
  1284. gcode:
  1285.    END_PRINT
  1286.    
  1287. [gcode_arcs]
  1288. #resolution: 1.0
  1289. #   An arc will be split into segments. Each segment's length will
  1290. #   equal the resolution in mm set above. Lower values will produce a
  1291. #   finer arc, but also more work for your machine. Arcs smaller than
  1292. #   the configured value will become straight lines. The default is
  1293. #   1mm.
  1294.  
  1295. [temperature_sensor raspberry_pi]
  1296. sensor_type: temperature_host
  1297. min_temp: 10
  1298. max_temp: 100
  1299.  
  1300. [temperature_sensor mcu_temp]
  1301. sensor_type: temperature_mcu
  1302. min_temp: 10
  1303. max_temp: 100
  1304.  
  1305. [neopixel my_neopixel]
  1306. pin: PD0
  1307. #   The pin connected to the neopixel. This parameter must be
  1308. #   provided.
  1309. chain_count: 3
  1310. #   The number of Neopixel chips that are "daisy chained" to the
  1311. #   provided pin. The default is 1 (which indicates only a single
  1312. #   Neopixel is connected to the pin).
  1313. color_order: RGB
  1314. #   Set the pixel order required by the LED hardware. Options are GRB,
  1315. #   RGB, GRBW, or RGBW. The default is GRB.
  1316. initial_RED: 0.0
  1317. initial_GREEN: 0.0
  1318. initial_BLUE: 0.0
  1319. #initial_WHITE: 0.0
  1320. #   Sets the initial LED color of the Neopixel. Each value should be
  1321. #   between 0.0 and 1.0. The WHITE option is only available on RGBW
  1322. #   LEDs. The default for each color is 0.
  1323.  
  1324. #*# <---------------------- SAVE_CONFIG ---------------------->
  1325. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  1326. #*#
  1327. #*# [extruder]
  1328. #*# control = pid
  1329. #*# pid_kp = 21.437
  1330. #*# pid_ki = 0.999
  1331. #*# pid_kd = 114.958
  1332. #*#
  1333. #*# [extruder1]
  1334. #*# control = pid
  1335. #*# pid_kp = 14.312
  1336. #*# pid_ki = 0.604
  1337. #*# pid_kd = 84.801
  1338. #*#
  1339. #*# [heater_bed]
  1340. #*# control = pid
  1341. #*# pid_kp = 69.977
  1342. #*# pid_ki = 1.012
  1343. #*# pid_kd = 1209.728
  1344. #*#
  1345. #*# [bltouch]
  1346. #*# z_offset = 2.80
  1347. #*#
  1348. #*# [bed_mesh default]
  1349. #*# version = 1
  1350. #*# points =
  1351. #*#     0.387500, 0.262500, 0.172500, 0.032500, -0.075000, -0.030000, -0.012500, 0.162500
  1352. #*#     0.382500, 0.260000, 0.135000, 0.020000, -0.070000, -0.010000, 0.030000, 0.170000
  1353. #*#     0.357500, 0.252500, 0.155000, 0.067500, -0.017500, 0.040000, 0.052500, 0.192500
  1354. #*#     0.325000, 0.232500, 0.170000, 0.072500, -0.042500, 0.045000, 0.062500, 0.192500
  1355. #*#     0.267500, 0.207500, 0.170000, 0.047500, -0.057500, 0.005000, 0.087500, 0.197500
  1356. #*#     0.247500, 0.200000, 0.137500, 0.022500, -0.090000, -0.005000, 0.037500, 0.170000
  1357. #*#     0.262500, 0.205000, 0.107500, -0.010000, -0.117500, -0.060000, -0.020000, 0.102500
  1358. #*#     0.275000, 0.212500, 0.072500, -0.032500, -0.162500, -0.097500, -0.037500, 0.080000
  1359. #*# tension = 0.2
  1360. #*# min_x = 5.0
  1361. #*# algo = bicubic
  1362. #*# y_count = 8
  1363. #*# mesh_y_pps = 2
  1364. #*# min_y = 5.0
  1365. #*# x_count = 8
  1366. #*# max_y = 213.95
  1367. #*# mesh_x_pps = 2
  1368. #*# max_x = 225.99
  1369.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement