Created
March 16, 2022 08:13
-
-
Save catid/8212a1e2e160de5fcc4ac2adfce2d300 to your computer and use it in GitHub Desktop.
printer.cfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[include mainsail.cfg] | |
[include timelapse.cfg] | |
# This file contains common pin mappings for the BigTreeTech Octopus V1. | |
# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" | |
# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference | |
# after running "make", copy the generated "klipper/out/klipper.bin" file to a | |
# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. | |
# See docs/Config_Reference.md for a description of parameters. | |
## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config | |
## *** THINGS TO CHANGE/CHECK: *** | |
## MCU paths [mcu] section | |
## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file | |
## Z Endstop Switch location [safe_z_home] section | |
## Homing end position [gcode_macro G32] section | |
## Z Endstop Switch offset for Z0 [stepper_z] section | |
## Probe points [quad_gantry_level] section | |
## Min & Max gantry corner postions [quad_gantry_level] section | |
## PID tune [extruder] and [heater_bed] sections | |
## Thermistor types [extruder] and [heater_bed] sections | |
## Probe pin [probe] section | |
## Fine tune E steps [extruder] section | |
[mcu] | |
serial: /dev/ttyAMA0 | |
restart_method: command | |
[printer] | |
kinematics: corexy | |
max_velocity: 500 | |
max_accel: 10000 | |
max_accel_to_decel: 10000 | |
max_z_velocity: 25 | |
max_z_accel: 1000 | |
square_corner_velocity: 10.0 | |
[input_shaper] | |
shaper_freq_x: 90.0 | |
shaper_type_x: zv | |
shaper_freq_y: 50.2 | |
shaper_type_y: mzv | |
##################################################################### | |
# X/Y Stepper Settings | |
##################################################################### | |
## B Stepper - Left | |
## Connected to MOTOR_0 | |
[stepper_x] | |
enable_pin: !PF14 | |
step_pin: PF13 | |
dir_pin: PF12 | |
endstop_pin: PG6 | |
microsteps: 256 | |
rotation_distance: 40 | |
full_steps_per_rotation: 200 #set to 400 for 0.9 degree stepper | |
position_min: 0 | |
position_endstop: 246 | |
position_max: 246 | |
homing_speed: 60 | |
homing_retract_dist: 6 | |
homing_positive_dir: true | |
[tmc5160 stepper_x] | |
# https://www.klipper3d.org/TMC_Drivers.html | |
# https://github.com/bigtreetech/BIGTREETECH-TMC5160-V1.0 | |
cs_pin: PC4 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
## A Stepper - Right | |
## Connected to MOTOR_1 | |
[stepper_y] | |
enable_pin: !PF15 | |
step_pin: PG0 | |
dir_pin: PG1 | |
endstop_pin: PG9 | |
microsteps: 256 | |
rotation_distance: 40 | |
full_steps_per_rotation: 200 #set to 400 for 0.9 degree stepper | |
position_min: 0 | |
position_endstop: 256 | |
position_max: 259 # extra 3 for Klicky mod | |
homing_speed: 60 | |
homing_retract_dist: 6 | |
homing_positive_dir: true | |
[tmc5160 stepper_y] | |
cs_pin: PD11 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
##################################################################### | |
# Z Stepper Settings | |
##################################################################### | |
## Z0 Stepper - Front Left | |
## Connected to MOTOR_2 | |
[stepper_z] | |
enable_pin: !PG5 | |
step_pin: PF11 | |
dir_pin: PG3 | |
endstop_pin: PG10 | |
rotation_distance: 40 | |
gear_ratio: 80:16 | |
microsteps: 256 | |
## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) | |
## (+) value = endstop above Z0, (-) value = endstop below | |
## Increasing position_endstop brings nozzle closer to the bed | |
## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config | |
#position_endstop: 0.0 | |
position_max: 220 | |
position_min: -2.0 | |
homing_speed: 8.0 | |
second_homing_speed: 3.0 | |
homing_retract_dist: 2.0 | |
[tmc5160 stepper_z] | |
cs_pin: PC6 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
## Z1 Stepper - Rear Left | |
## Connected to MOTOR_3 | |
[stepper_z1] | |
enable_pin: !PA0 | |
step_pin: PG4 | |
dir_pin: !PC1 | |
rotation_distance: 40 | |
gear_ratio: 80:16 | |
microsteps: 256 | |
[tmc5160 stepper_z1] | |
cs_pin: PC7 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
## Z2 Stepper - Rear Right | |
## Connected to MOTOR_4 | |
[stepper_z2] | |
enable_pin: !PG2 | |
step_pin: PF9 | |
dir_pin: PF10 | |
rotation_distance: 40 | |
gear_ratio: 80:16 | |
microsteps: 256 | |
[tmc5160 stepper_z2] | |
cs_pin: PF2 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
## Z3 Stepper - Front Right | |
## Connected to MOTOR_5 | |
[stepper_z3] | |
enable_pin: !PF1 | |
step_pin: PC13 | |
dir_pin: !PF0 | |
rotation_distance: 40 | |
gear_ratio: 80:16 | |
microsteps: 256 | |
[tmc5160 stepper_z3] | |
cs_pin: PE4 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
##################################################################### | |
# Extruder | |
##################################################################### | |
## Connected to MOTOR_6 | |
## Heater - HE0 | |
## Thermistor - T0 | |
[extruder] | |
enable_pin: !PD4 | |
step_pin: PE2 | |
dir_pin: !PE3 | |
rotation_distance: 35.49256 | |
gear_ratio: 5.18:1 | |
microsteps: 256 | |
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree | |
nozzle_diameter: 0.8 | |
filament_diameter: 1.75 | |
heater_pin: PA2 | |
sensor_type: SliceEngineering 450 | |
sensor_pin: PF4 | |
min_temp: 10 | |
max_temp: 300 | |
max_power: 1.0 | |
min_extrude_temp: 20 | |
control = pid | |
pid_kp = 23.676 | |
pid_ki = 1.518 | |
pid_kd = 92.335 | |
# FormFutura TitanX Red, 0.8 mm nozzle, 245C | |
#pressure_advance: 0.32 | |
#pressure_advance_smooth_time: 0.040 | |
# FormFutura TitanX Red, 0.4 mm nozzle, 245C | |
#pressure_advance: 0.30 | |
#pressure_advance_smooth_time: 0.030 | |
# ezPC+CF, 0.6 mm nozzle, 275C | |
#pressure_advance: 0.34 | |
#pressure_advance_smooth_time: 0.030 | |
# Matterhackers Pro ABS Black, 0.4 mm nozzle, 235C | |
pressure_advance: 0.32 | |
pressure_advance_smooth_time: 0.030 | |
[firmware_retraction] | |
retract_length: 4.0 | |
retract_speed: 60 | |
unretract_extra_length: 0.0 | |
unretract_speed: 60 | |
[tmc5160 extruder] | |
cs_pin: PE1 | |
spi_bus: spi1 | |
sense_resistor: 0.075 | |
run_current: 1.2 | |
interpolate: false | |
stealthchop_threshold: 0 | |
##################################################################### | |
# Bed Heater | |
##################################################################### | |
[heater_bed] | |
## SSR Pin - HE1 | |
## Thermistor - TB | |
heater_pin: PA3 | |
sensor_type: Generic 3950 | |
sensor_pin: PF3 | |
# 0.4W/cm2 = 0.4 * 25 * 25 = 250W, 100/500 * 250 = 50 -> 0.5 | |
max_power: 0.5 | |
min_temp: 0 | |
max_temp: 120 | |
control = pid | |
pid_kp = 36.831 | |
pid_ki = 1.860 | |
pid_kd = 182.313 | |
##################################################################### | |
# Probe | |
##################################################################### | |
[probe] | |
pin: ^PG12 | |
x_offset: 0 | |
y_offset: 19.75 | |
z_offset: 6.42 | |
speed: 3.0 | |
lift_speed: 15 | |
samples: 3 | |
samples_result: median | |
sample_retract_dist: 3.0 | |
samples_tolerance: 0.01 | |
samples_tolerance_retries: 5 | |
##################################################################### | |
# Fan Control | |
##################################################################### | |
[fan] | |
## Print Cooling Fan - FAN0 | |
pin: PD12 | |
kick_start_time: 0.5 | |
## Depending on your fan, you may need to increase this value | |
## if your fan will not start. Can change cycle_time (increase) | |
## if your fan is not able to slow down effectively | |
off_below: 0.10 | |
[heater_fan hotend_fan] | |
## Hotend Fan - FAN1 | |
pin: PE5 | |
max_power: 1.0 | |
kick_start_time: 0.5 | |
heater: extruder | |
heater_temp: 50.0 | |
## If you are experiencing back flow, you can reduce fan_speed | |
#fan_speed: 1.0 | |
##################################################################### | |
# LED Control | |
##################################################################### | |
# Chamber Lighting - HE2 Connector (Optional) | |
[output_pin caselight] | |
pin: PB10 | |
pwm: true | |
shutdown_value: 0 | |
value: 1 | |
cycle_time: 0.01 | |
##################################################################### | |
# Homing and Gantry Adjustment Routines | |
##################################################################### | |
[idle_timeout] | |
timeout: 1800 | |
# Disabled by Klicky mod | |
#[safe_z_home] | |
#home_xy_position: 176, 256 | |
#speed: 100 | |
#z_hop: 10 | |
[quad_gantry_level] | |
## Use QUAD_GANTRY_LEVEL to level a gantry. | |
## Min & Max gantry corners - measure from nozzle at MIN (0,0) and | |
## MAX (250, 250), (300,300), or (350,350) depending on your printer size | |
## to respective belt positions | |
gantry_corners: | |
-60,-10 | |
310, 320 | |
points: | |
50,25 | |
50,175 | |
200,175 | |
200,25 | |
speed: 300 | |
horizontal_move_z: 12 | |
retries: 5 | |
retry_tolerance: 0.0075 | |
max_adjust: 4 | |
[bed_mesh] | |
speed: 300 | |
horizontal_move_z: 12 | |
mesh_min: 40, 40 | |
mesh_max: 210,210 | |
fade_start: 1.0 | |
fade_end: 20.0 | |
probe_count: 3,3 | |
algorithm: bicubic | |
relative_reference_index: 4 | |
######################################## | |
# EXP1 / EXP2 (display) pins | |
######################################## | |
[board_pins] | |
aliases: | |
# EXP1 header | |
EXP1_1=PE8, EXP1_2=PE7, | |
EXP1_3=PE9, EXP1_4=PE10, | |
EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side | |
EXP1_7=PE14, EXP1_8=PE15, | |
EXP1_9=<GND>, EXP1_10=<5V>, | |
# EXP2 header | |
EXP2_1=PA6, EXP2_2=PA5, | |
EXP2_3=PB1, EXP2_4=PA4, | |
EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side | |
EXP2_7=PC15, EXP2_8=<RST>, | |
EXP2_9=<GND>, EXP2_10=<5V> | |
################################################################################ | |
# Mods | |
################################################################################ | |
[filament_switch_sensor RunoutSensor] | |
pause_on_runout: False | |
runout_gcode: PAUSE | |
insert_gcode: RESUME | |
switch_pin: !PG11 | |
[multi_pin my_fans] | |
pins: PA8, PD13, PD14, PD15 | |
# Optional 12V pull fans across from the always-on controller fans | |
[controller_fan misc_fans] | |
pin=multi_pin:my_fans | |
kick_start_time: 0.5 | |
## Depending on your fan, you may need to increase this value | |
## if your fan will not start. Can change cycle_time (increase) | |
## if your fan is not able to slow down effectively | |
off_below: 0.10 | |
# This is required to get the motors working on spi1 | |
[static_digital_output disable_max31865] | |
pins: !PF8 | |
##################################################################### | |
# Input Shaper | |
##################################################################### | |
[mcu rpi] | |
serial: /tmp/klipper_host_mcu | |
[adxl345] | |
cs_pin: rpi:None | |
[resonance_tester] | |
accel_chip: adxl345 | |
probe_points: | |
100, 100, 20 # an example | |
##################################################################### | |
# Auto Z-Calibration | |
##################################################################### | |
[z_calibration] | |
probe_nozzle_x: 176 | |
probe_nozzle_y: 258 | |
# The X and Y coordinates (in mm) for clicking the nozzle on the | |
# Z endstop. | |
probe_switch_x: 170 | |
probe_switch_y: 235 | |
# The X and Y coordinates (in mm) for clicking the probe's switch | |
# on the Z endstop. | |
probe_bed_x: 125 | |
probe_bed_y: 125 | |
# The X and Y coordinates (in mm) for probing on the print surface | |
# (e.g. the center point) These coordinates will be adapted by the | |
# probe's X and Y offsets. The default is the relative_reference_index | |
# of the configured bed_mesh. It will raise an error if there is no | |
# probe_bed site and no bed_mesh with a relative_reference_index | |
# configured. | |
switch_offset: 0.48 | |
# Larger values are closer to the bed | |
max_deviation: 1.0 | |
# The maximum allowed deviation of the calculated offset. | |
# If the offset exceeds this value, it will stop! | |
# The default is 1.0 mm. | |
samples: 5 | |
# The number of times to probe each point. The probed z-values | |
# will be averaged. The default is from the probe's configuration. | |
samples_tolerance: 0.01 | |
# The maximum Z distance (in mm) that a sample may differ from other | |
# samples. The default is from the probe's configuration. | |
samples_tolerance_retries: 5 | |
# The number of times to retry if a sample is found that exceeds | |
# samples_tolerance. The default is from the probe's configuration. | |
samples_result: median | |
# The calculation method when sampling more than once - either | |
# "median" or "average". The default is from the probe's configuration. | |
clearance: 15.0 | |
# The distance in mm to move up before moving to the next | |
# position. The default is two times the z_offset from the probe's | |
# configuration. | |
position_min: -2.0 | |
# Minimum valid distance (in mm) used for probing move. The | |
# default is from the Z rail configuration. | |
speed: 100 | |
# The moving speed in X and Y. The default is 50 mm/s. | |
lift_speed: 15.0 | |
# Speed (in mm/s) of the Z axis when lifting the probe between | |
# samples and clearance moves. The default is from the probe's | |
# configuration. | |
probing_speed: 3.0 | |
# The fast probing speed (in mm/s) used, when probing_first_fast | |
# is activated. The default is from the Z rail configuration. | |
probing_second_speed: 3.0 | |
# The slower speed (in mm/s) for probing the recorded samples. | |
# The default is second_homing_speed of the Z rail configuration. | |
probing_retract_dist: 8.0 | |
# Distance to backoff (in mm) before probing the next sample. | |
# The default is homing_retract_dist from the Z rail configuration. | |
probing_first_fast: false | |
# If true, the first probing is done faster by the probing speed. | |
# This is to get faster down and the result is not recorded as a | |
# probing sample. The default is false. | |
start_gcode: | |
# A list of G-Code commands to execute prior to each calibration command. | |
# See docs/Command_Templates.md for G-Code format. This can be used to | |
# attach the probe. | |
before_switch_gcode: | |
# A list of G-Code commands to execute prior to each probing on the | |
# mag-probe. See docs/Command_Templates.md for G-Code format. This can be | |
# used to attach the probe after probing on the nozzle and before probing | |
# on the mag-probe. | |
end_gcode: | |
# A list of G-Code commands to execute after each calibration command. | |
# See docs/Command_Templates.md for G-Code format. This can be used to | |
# detach the probe afterwards. | |
##################################################################### | |
# Macros | |
##################################################################### | |
[include klicky-probe.cfg] | |
[gcode_macro clean_nozzle] | |
# If you are putting your purge bucket at the rear left of the bed as per default installation, enable True on your location_bucket_rear | |
# variable. If you want to put your purge bucket elsewhere (perhaps the front), then set it to False. See diagrams and description | |
# further below on how to set your XY position. | |
variable_location_bucket_rear: True | |
# If you want the purging routine in your bucket enabled, set to True (and vice versa). | |
variable_enable_purge: True | |
# These parameters define your filament purging. The retract variable is used to retract right after purging to prevent unnecessary | |
# oozing. Some filament are particularly oozy and may continue to ooze out of the nozzle for a second or two after retracting. The | |
# ooze dwell variable makes allowance for this. Update as necessary. If you decided to not enable purge, you can ignore this section. | |
variable_purge_len: 30 ; Amount of filament, in mm, to purge. | |
variable_purge_spd: 150 ; Speed, in mm/min, of the purge. | |
variable_purge_temp_min: 250 ; Minimum nozzle temperature to permit a purge. Otherwise, purge will not occur. | |
variable_purge_ret: 10 ; Retract length, in mm, after purging to prevent slight oozing. Adjust as necessary. | |
variable_ooze_dwell: 2 ; Dwell/wait time, in seconds, after purging and retracting. | |
# Adjust this so that your nozzle scrubs within the brush. Currently defaulted to be a lot higher for safety. Be careful not to go too low! | |
variable_brush_top: -1.0 | |
# These parameters define your scrubbing, travel speeds, safe z clearance and how many times you want to wipe. Update as necessary. Wipe | |
# direction is randomized based off whether the left or right bucket is randomly selected in the purge & scrubbing routine. | |
variable_clearance_z: 20 ; When traveling, but not cleaning, the clearance along the z-axis between nozzle and brush. | |
variable_wipe_qty: 3 ; Number of complete (A complete wipe: left, right, left OR right, left, right) wipes. | |
variable_prep_spd_xy: 4000 ; Travel (not cleaning) speed along x and y-axis in mm/min. | |
variable_prep_spd_z: 2000 ; Travel (not cleaning) speed along z axis in mm/min. | |
variable_wipe_spd_xy: 10000 ; Nozzle wipe speed in mm/min. | |
# These parameters define the size of the brush. Update as necessary. A visual reference is provided below. Note that orientation of | |
# parameters remain the same whether bucket is at rear or front. | |
# | |
# ← brush_width → | |
# _________________ ↑ | |
# | | ↑ If you chose location_bucket_rear = True, Y position is acquired | |
# brush_start (x) | | brush_depth from your stepper_y position_max. Adjust your brush physically in | |
# |_________________| ↓ Y so that the nozzle scrubs within the brush. | |
# (y) ↓ | |
# brush_front | |
# __________________________________________________________ | |
# PRINTER FRONT | |
# | |
# | |
## For V1.8, you may need to measure where your brush is on the x axis and input manually into any of the variable_brush_start uncommented. | |
## For V2.4 250mm build, uncomment this below: | |
variable_brush_start: 25 | |
## For V2.4 300mm build, uncomment this below: | |
#variable_brush_start: 50 | |
## For V2.4 350mm build, uncomment this below: | |
#variable_brush_start: 75 | |
# This value is defaulted from brush location in CAD (rear left). Change if your brush width is different. | |
variable_brush_width: 52 | |
## These are only used if location_bucket_rear is False. You specify a custom location in y axis for your brush - see diagram above. ## | |
variable_brush_front: 0 | |
variable_brush_depth: 0 | |
# These parameters define the size of your purge bucket. Update as necessary. If you decided to not enable purge, you can ignore | |
# this section. A visual reference is provided below. Note that orientation of parameters remain the same whether bucket is at rear | |
# or front. | |
# | |
# bucket_gap | |
# ← ---- → | |
# __________________________________________ | |
# | | | | | |
# | | | | | |
# bucket_start (x) | |______| | | |
# | | | | | |
# | | | | | |
# |_________________|. . . |_________________| | |
# ← ------------- → ← ------------- → | |
# bucket_left_width bucket_right_width | |
# _______________________________________________________________________________________ | |
# PRINTER FRONT | |
# | |
## For V2.4 250mm build, uncomment below | |
variable_bucket_left_width: 42 | |
## For V2.4 300mm build, uncomment below | |
#variable_bucket_left_width: 67 | |
## For V2.4 350mm build, uncomment below | |
#variable_bucket_left_width: 92 | |
# These values are defaulted from bucket geometry in CAD (rear left location). Change only if you're using a custom bucket. | |
variable_bucket_right_width: 40 | |
variable_bucket_gap: 22 | |
# For V1.8, you may need to measure where your bucket start is and input into bucket_start. Otherwise, a value of 0 is for a default | |
# installation of purge bucket at rear left. | |
variable_bucket_start: 0 | |
############################################################################################################################################### | |
############################################################################################################################################### | |
### From here on, unless you know what you're doing, it's recommended not to change anything. Feel free to peruse the code and reach out to me | |
### (edwardyeeks#6042) on Discord if you spot any problems! | |
############################################################################################################################################### | |
############################################################################################################################################### | |
# Placeholder. The variable will later be set to contain, at random, a number representing the left or right bucket. | |
variable_bucket_pos: 1 | |
gcode: | |
# First, check if the axes are homed. | |
{% if "xyz" in printer.toolhead.homed_axes %} | |
## Save the gcode state in this macro instance. | |
SAVE_GCODE_STATE NAME=clean_nozzle | |
## Set to absolute positioning. | |
G90 | |
## Grab max position of Y-axis from config to use in setting a fixed y position for location_bucket_rear = True. | |
#{% set Ry = printer.configfile.config["stepper_y"]["position_max"]|float %} | |
# Hack: configure for my printer | |
{% set Ry = 258.0 %} | |
## Check if user enabled purge option or not. | |
{% if enable_purge %} | |
### Randomly select left or right bin for purge. 0 = left, 1 = right | |
SET_GCODE_VARIABLE MACRO=clean_nozzle VARIABLE=bucket_pos VALUE={(range(2) | random)} | |
### Raise Z for travel. | |
G1 Z{brush_top + clearance_z} F{prep_spd_z} | |
### Check if user chose to use rear location. | |
{% if location_bucket_rear %} | |
G1 Y{Ry} F{prep_spd_xy} | |
{% else %} | |
G1 Y{brush_front + (brush_depth / 2)} F{prep_spd_xy} | |
{% endif %} | |
### Position for purge. Randomly selects middle of left or right bucket. It references from the middle of the left bucket. | |
G1 X{bucket_start + (bucket_left_width / (2 - bucket_pos)) + (bucket_pos * bucket_gap) + (bucket_pos * (bucket_right_width / 2))} | |
### Perform purge if the temp is up to min temp. If not, it will skip and continue executing rest of macro. Small retract after | |
### purging to minimize any persistent oozing at 5x purge_spd. G4 dwell is in milliseconds, hence * 1000 in formula. | |
{% if printer.extruder.temperature >= purge_temp_min %} | |
M83 ; relative mode | |
G1 E{purge_len} F{purge_spd} | |
{% if params.RETRACT %} | |
G1 E-{purge_ret} F{purge_spd * 5} | |
{% endif %} | |
G4 P{ooze_dwell * 1000} | |
G92 E0 ; reset extruder | |
{% endif %} | |
{% endif %} | |
## Position for wipe. Either left or right of brush based off bucket_pos to avoid unnecessary travel. | |
G1 Z{brush_top + clearance_z} F{prep_spd_z} | |
G1 X{brush_start + (brush_width * bucket_pos)} F{prep_spd_xy} | |
## Check if user chose to use rear location. | |
{% if location_bucket_rear %} | |
G1 Y{Ry} | |
{% else %} | |
G1 Y{brush_front + (brush_depth / 2)} | |
{% endif %} | |
## Move nozzle down into brush. | |
G1 Z{brush_top} F{prep_spd_z} | |
## Perform wipe. Wipe direction based off bucket_pos for cool random scrubby routine. | |
{% for wipes in range(1, (wipe_qty + 1)) %} | |
G1 X{brush_start + (brush_width * (1 - bucket_pos))} F{wipe_spd_xy} | |
G1 X{brush_start + (brush_width * bucket_pos)} F{wipe_spd_xy} | |
{% endfor %} | |
## Clear from area. | |
G1 Z{brush_top + clearance_z} F{prep_spd_z} | |
G1 X{bucket_left_width / 4} F{prep_spd_xy} | |
; Move to a safe location to avoid whacking the bed | |
G0 Z15 F3600 | |
## Restore the gcode state to how it was before the macro. | |
RESTORE_GCODE_STATE NAME=clean_nozzle | |
{% else %} | |
## raise error will stop any macros that clean_nozzle is referenced in from proceeding for safety. | |
{ action_raise_error("Please home your axes!") } | |
M117 Please home first! | |
{% endif %} | |
[gcode_macro G32] | |
gcode: | |
G28 | |
QUAD_GANTRY_LEVEL | |
G1 Z30 F900 | |
G1 X125 Y125 Z30 F3600 | |
clean_nozzle RETRACT=true | |
G28 | |
G1 Z30 F900 | |
G1 X125 Y125 Z30 F3600 | |
[gcode_macro PRINT_START] | |
gcode: | |
M117 Print Starting... | |
; Make sure we are not applying stale bed mesh or Z offset | |
SET_GCODE_OFFSET Z=0 | |
BED_MESH_CLEAR | |
; Start heating bed | |
M140 S{params.BED} | |
; Initial home XYZ | |
G28 | |
G1 Z30 F900 | |
; Start heating nozzle | |
M104 S{params.EXTRUDER} | |
; Finish heating bed | |
M190 S{params.BED} | |
; Finish heating nozzle | |
M109 S{params.EXTRUDER} | |
; Clean nozzle and rehome Z because there may have been some filament stuck to it before | |
G1 X125 Y125 Z30 F3600 | |
clean_nozzle RETRACT=true | |
G1 Z30 F900 | |
G1 X125 Y125 Z30 F3600 | |
G28 Z | |
ATTACH_PROBE | |
; Auto-calibration of nozzle to bed offset | |
CALIBRATE_Z | |
; Use original versions to avoid attaching probes twice | |
_QUAD_GANTRY_LEVEL | |
_BED_MESH_CALIBRATE | |
DOCK_PROBE | |
M117 Prime Line | |
G1 Z30 F900 | |
G1 X125 Y125 Z30 F3600 | |
G92 E0 ;Reset Extruder | |
# move to prime position | |
G1 X65.5 Y240.0 Z0.3 F2500.0 ; Move to start position | |
G1 X5.5 Y240.0 Z0.3 F800.0 E10 ; Draw the first line | |
G1 X5.5 Y239.5 Z0.3 F2500.0 ; Move to side a little | |
G1 X65.5 Y239.5 Z0.3 F800.0 E20 ; Draw the second line | |
G92 E0 ; Reset Extruder | |
G1 Z2.0 F3600 ; Move Z Axis up little to prevent scratching of Heat Bed | |
G1 X230 Y230 Z2.0 F5000.0 ; Move over to prevent blob squish | |
M117 Print Begin | |
[gcode_macro EXIT_BED] | |
gcode: | |
# safe anti-stringing move coords | |
{% set th = printer.toolhead %} | |
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 25 else -1) %} | |
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 25 else -1) %} | |
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} | |
M400 ; wait for buffer to clear | |
G92 E0 ; zero the extruder | |
G1 E-10.0 F3600 ; retract filament | |
G90 ; absolute positioning | |
G1 X{x_safe} Y{y_safe} Z{z_safe} F5000 ; move nozzle off part at a diagonal to limit stringing | |
G1 X25 Y258 F3000 ; park nozzle over purge bucket left | |
M107 ; turn off fan | |
; Remove calibrated Z offset | |
SET_GCODE_OFFSET Z=0 | |
TURN_OFF_HEATERS | |
[gcode_macro PRINT_END] | |
gcode: | |
SAVE_GCODE_STATE NAME=STATE_PRINT_END | |
EXIT_BED | |
RESTORE_GCODE_STATE NAME=STATE_PRINT_END | |
[gcode_macro CANCEL_PRINT] | |
rename_existing: CANCEL_PRINT_BASE | |
gcode: | |
TURN_OFF_HEATERS | |
CANCEL_PRINT_BASE | |
EXIT_BED | |
#*# <---------------------- SAVE_CONFIG ----------------------> | |
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. | |
#*# | |
#*# [bed_mesh default] | |
#*# version = 1 | |
#*# points = | |
#*# 0.025781, 0.010625, 0.021406 | |
#*# 0.026406, 0.000000, 0.015000 | |
#*# 0.048281, 0.035469, 0.055312 | |
#*# tension = 0.2 | |
#*# min_x = 40.0 | |
#*# algo = bicubic | |
#*# y_count = 3 | |
#*# mesh_y_pps = 2 | |
#*# min_y = 40.0 | |
#*# x_count = 3 | |
#*# max_y = 210.0 | |
#*# mesh_x_pps = 2 | |
#*# max_x = 210.0 | |
#*# | |
#*# [stepper_z] | |
#*# position_endstop = 1.460 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment