massive update
This commit is contained in:
parent
ad83330206
commit
81e95079ce
8 changed files with 483 additions and 53 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
printer-*.cfg
|
||||
.theme
|
||||
*.bkp
|
||||
*.swp
|
||||
|
|
101
basic_macros.cfg
101
basic_macros.cfg
|
@ -1,7 +1,62 @@
|
|||
[gcode_macro PRINT_START]
|
||||
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
|
||||
gcode:
|
||||
# Slicer Parameters
|
||||
{% set hotendTemp = params.HOTEND|int %}
|
||||
{% set bedTemp = params.BED|int %}
|
||||
{% set chamberTemp = params.CHAMBER|default(0)|int %}
|
||||
|
||||
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={hotendTemp|float*0.6} # Set extruder chamber warm temp
|
||||
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bedTemp} # Set bed temp to warm while starting up
|
||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1 # Disable probe attach/detach
|
||||
G28 # home after setting temps
|
||||
M117 Waiting for bed temperature...
|
||||
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp} MAXIMUM={bedTemp+1} # Wait for bed temp (within 1 degree)
|
||||
#{% if chamberTemp != 0 %} # If chamber temp set
|
||||
# CHAMBER_WARMER TEMPERATURE={chamberTemp} # Warm chamber
|
||||
#{% endif %}
|
||||
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={hotendTemp|float*0.8} # Set extruder don't drip temp
|
||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1 # Disable probe attach/detach
|
||||
ATTACH_PROBE
|
||||
CLEAN_NOZZLE
|
||||
FAST_QGL # QGL after soak
|
||||
DETACH_PROBE # Ensure probe is detached
|
||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1 # Enable probe attach/detach
|
||||
G90 # Absolute positioning
|
||||
GO_TO_BUCKET # Move to park position
|
||||
M109 S{hotendTemp} # Set extruder to printing temperature
|
||||
PURGE_X # Purge
|
||||
G1 X{90} F{500*60} # Avoid brush
|
||||
M117 Printing...
|
||||
|
||||
|
||||
|
||||
[gcode_macro PARK]
|
||||
gcode:
|
||||
{% set th = printer.toolhead %}
|
||||
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30
|
||||
GO_TO_BUCKET
|
||||
|
||||
[gcode_macro GO_TO_BUCKET]
|
||||
gcode:
|
||||
{% set X = 18 %}
|
||||
{% set Y = 184 %}
|
||||
{% set Z = 2 %}
|
||||
###########
|
||||
SAFE_RETRACT
|
||||
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
|
||||
# Tall hop if low
|
||||
{% if printer.toolhead.position.z < 10 %}
|
||||
G90
|
||||
G1 Z10
|
||||
# Short hop if high
|
||||
{% elif printer.toolhead.position.z < (max_z - Z - 1) %}
|
||||
G91
|
||||
G1 Z{Z}
|
||||
{% endif %}
|
||||
G90
|
||||
G1 X{X} F{500*60}
|
||||
G1 Y{Y} F{500*60}
|
||||
G91
|
||||
|
||||
|
||||
[gcode_macro G32]
|
||||
gcode:
|
||||
|
@ -13,13 +68,6 @@ gcode:
|
|||
PARK
|
||||
RESTORE_GCODE_STATE NAME=STATE_G32
|
||||
|
||||
[gcode_macro PRINT_START]
|
||||
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
|
||||
gcode:
|
||||
G32 ; home all axes
|
||||
G90 ; absolute positioning
|
||||
G1 Z20 F3000 ; move nozzle away from bed
|
||||
|
||||
|
||||
[gcode_macro PRINT_END]
|
||||
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
|
||||
|
@ -46,9 +94,6 @@ gcode:
|
|||
BED_MESH_CLEAR
|
||||
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
|
||||
|
||||
#QUAD_GANTRY_LEVEL horizontal_move_z=10 retry_tolerance=1.000 # First slow pass far away from the bed as a "sanity check"
|
||||
#QUAD_GANTRY_LEVEL horizontal_move_z=2 # Lower pass at speed
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
rename_existing: BASE_CANCEL_PRINT
|
||||
gcode:
|
||||
|
@ -71,11 +116,6 @@ gcode:
|
|||
G1 E-1.7 F2100
|
||||
PARK
|
||||
BASE_PAUSE
|
||||
#G91
|
||||
#G1 Z{Z}
|
||||
#G90
|
||||
#G1 X{X} Y{Y} F6000
|
||||
#G91
|
||||
|
||||
[gcode_macro RESUME]
|
||||
rename_existing: BASE_RESUME
|
||||
|
@ -86,3 +126,30 @@ gcode:
|
|||
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
|
||||
BASE_RESUME
|
||||
|
||||
[gcode_macro FAST_QGL]
|
||||
gcode:
|
||||
{% set z_offset = 3.5 %}
|
||||
# Home first if needed
|
||||
{% if printer.toolhead.homed_axes != "xyz" %}
|
||||
G28
|
||||
{% endif %}
|
||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=0
|
||||
ATTACH_PROBE
|
||||
QUAD_GANTRY_LEVEL horizontal_move_z={z_offset * 3} retry_tolerance=1
|
||||
QUAD_GANTRY_LEVEL horizontal_move_z={z_offset}
|
||||
G28 Z
|
||||
DETACH_PROBE
|
||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1
|
||||
|
||||
[gcode_macro SAFE_RETRACT]
|
||||
gcode:
|
||||
{% if printer.extruder.can_extrude %}
|
||||
G10
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro SAFE_UNRETRACT]
|
||||
gcode:
|
||||
{% if printer.extruder.can_extrude %}
|
||||
G11
|
||||
{% endif %}
|
||||
|
||||
|
|
171
calibration_macros.cfg
Normal file
171
calibration_macros.cfg
Normal file
|
@ -0,0 +1,171 @@
|
|||
[gcode_macro TEST_RESONNANCES_X]
|
||||
gcode:
|
||||
TEST_RESONANCES AXIS=X
|
||||
|
||||
|
||||
[gcode_macro TEST_RESONNANCES_Y]
|
||||
gcode:
|
||||
TEST_RESONANCES AXIS=Y
|
||||
|
||||
|
||||
[gcode_macro FLOW_CALIBRATION]
|
||||
gcode:
|
||||
M221 S{params.FLOW}
|
||||
SET_PRESSURE_ADVANCE ADVANCE={params.PRESSURE_ADVANCE}
|
||||
|
||||
[gcode_macro TEST_Z_DOWN]
|
||||
gcode:
|
||||
{% set amount = params.amount|default(1)|int %}
|
||||
TESTZ Z=-{amount}
|
||||
|
||||
[gcode_macro TEST_Z_UP]
|
||||
gcode:
|
||||
{% set amount = params.amount|default(1)|int %}
|
||||
TESTZ Z=+{amount}
|
||||
|
||||
[gcode_macro TEST_Z_BISECT_UP]
|
||||
gcode:
|
||||
TESTZ Z=+
|
||||
|
||||
[gcode_macro TEST_Z_BISECT_DOWN]
|
||||
gcode:
|
||||
TESTZ Z=-
|
||||
|
||||
[gcode_macro PID_HOTEND]
|
||||
gcode:
|
||||
PID_CALIBRATE HEATER=extruder TARGET=260
|
||||
|
||||
[gcode_macro PID_BED]
|
||||
gcode:
|
||||
PID_CALIBRATE HEATER=heater_bed TARGET=110
|
||||
|
||||
[gcode_macro DISABLE_Z]
|
||||
gcode:
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=0
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_z1 ENABLE=0
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_z2 ENABLE=0
|
||||
|
||||
[gcode_macro ENABLE_XY]
|
||||
gcode:
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=1
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=1
|
||||
|
||||
[gcode_macro DISABLE_XY]
|
||||
gcode:
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=0
|
||||
SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=0
|
||||
|
||||
[gcode_macro TEST_SPEED]
|
||||
gcode:
|
||||
# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10
|
||||
# Speed
|
||||
{% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %}
|
||||
# Iterations
|
||||
{% set iterations = params.ITERATIONS|default(1)|int %}
|
||||
# Acceleration
|
||||
{% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %}
|
||||
# Bounding inset for large pattern (helps prevent slamming the toolhead into the sides after small skips, and helps to account for machines with imperfectly set dimensions)
|
||||
{% set bound = params.BOUND|default(30)|int %}
|
||||
# Size for small pattern box
|
||||
{% set smallpatternsize = SMALLPATTERNSIZE|default(20)|int %}
|
||||
|
||||
# Large pattern
|
||||
# Max positions, inset by BOUND
|
||||
{% set x_min = printer.toolhead.axis_minimum.x + bound %}
|
||||
{% set x_max = printer.toolhead.axis_maximum.x - bound %}
|
||||
{% set y_min = printer.toolhead.axis_minimum.y + bound %}
|
||||
{% set y_max = printer.toolhead.axis_maximum.y - bound %}
|
||||
|
||||
# Small pattern at center
|
||||
# Find X/Y center point
|
||||
{% set x_center = (printer.toolhead.axis_minimum.x|float + printer.toolhead.axis_maximum.x|float ) / 2 %}
|
||||
{% set y_center = (printer.toolhead.axis_minimum.y|float + printer.toolhead.axis_maximum.y|float ) / 2 %}
|
||||
|
||||
# Set small pattern box around center point
|
||||
{% set x_center_min = x_center - (smallpatternsize/2) %}
|
||||
{% set x_center_max = x_center + (smallpatternsize/2) %}
|
||||
{% set y_center_min = y_center - (smallpatternsize/2) %}
|
||||
{% set y_center_max = y_center + (smallpatternsize/2) %}
|
||||
|
||||
# Save current gcode state (absolute/relative, etc)
|
||||
SAVE_GCODE_STATE NAME=TEST_SPEED
|
||||
|
||||
# Output parameters to g-code terminal
|
||||
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
|
||||
|
||||
# Home and get position for comparison later:
|
||||
G28
|
||||
|
||||
# Absolute positioning
|
||||
G90
|
||||
|
||||
# Set new limits
|
||||
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel}
|
||||
|
||||
|
||||
# Go to starting position
|
||||
G0 X{x_min} Y{y_min} Z{10} F{speed*60}
|
||||
|
||||
{% for i in range(iterations) %}
|
||||
# Large pattern
|
||||
# Diagonals
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_max} Y{y_max} F{speed*60}
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
G0 X{x_min} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
|
||||
# Box
|
||||
G0 X{x_min} Y{y_min} F{speed*60}
|
||||
G0 X{x_min} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_max} F{speed*60}
|
||||
G0 X{x_max} Y{y_min} F{speed*60}
|
||||
|
||||
# Small pattern
|
||||
# Small diagonals
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
|
||||
# Small box
|
||||
{% for i in range(10) %}
|
||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
# Restore max speed/accel/accel_to_decel to their configured values
|
||||
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
|
||||
|
||||
# Restore previous gcode state (absolute/relative, etc)
|
||||
RESTORE_GCODE_STATE NAME=TEST_SPEED
|
||||
|
||||
[gcode_macro DUMP_VARIABLES]
|
||||
gcode:
|
||||
{% set filter_name = params.NAME|default('')|string|lower %}
|
||||
{% set filter_value = params.VALUE|default('')|string|lower %}
|
||||
{% set show_cfg = params.SHOW_CFG|default(0)|int %}
|
||||
|
||||
{% set out = [] %}
|
||||
|
||||
{% for key1 in printer %}
|
||||
{% for key2 in printer[key1] %}
|
||||
{% if (show_cfg or not (key1|lower == 'configfile' and key2|lower in ['config', 'settings'])) and (filter_name in key1|lower or filter_name in key2|lower) and filter_value in printer[key1][key2]|string|lower %}
|
||||
{% set dummy = out.append("printer['%s'].%s = %s" % (key1, key2, printer[key1][key2])) %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if filter_name in key1|lower and filter_value in printer[key1]|string|lower %}
|
||||
{% set dummy = out.append("printer['%s'] = %s" % (key1, printer[key1])) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{action_respond_info(out|join("\n"))}
|
||||
|
||||
|
2
fans.cfg
2
fans.cfg
|
@ -18,7 +18,7 @@ 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
|
||||
fan_speed: 0.6
|
||||
|
||||
[output_pin TOOLHEAD_LED]
|
||||
pin: PE5
|
||||
|
|
58
printer.cfg
58
printer.cfg
|
@ -30,6 +30,9 @@ square_corner_velocity: 5.0
|
|||
[include fans.cfg]
|
||||
[include basic_macros.cfg]
|
||||
[include sensorless.cfg]
|
||||
#[include autoz.cfg]
|
||||
[include calibration_macros.cfg]
|
||||
[include purge_bucket.cfg]
|
||||
|
||||
[virtual_sdcard]
|
||||
path: ~/printer_data/gcodes
|
||||
|
@ -37,6 +40,8 @@ path: ~/printer_data/gcodes
|
|||
[display_status]
|
||||
[pause_resume]
|
||||
|
||||
[gcode_arcs]
|
||||
resolution: 0.1
|
||||
|
||||
#####################################################################
|
||||
# Bed Heater
|
||||
|
@ -46,30 +51,41 @@ path: ~/printer_data/gcodes
|
|||
heater_pin: PE1
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PA0
|
||||
max_power: 0.6
|
||||
max_power: 0.5
|
||||
min_temp: 0
|
||||
max_temp: 120
|
||||
control: pid
|
||||
pid_kp: 58.437
|
||||
pid_ki: 2.347
|
||||
pid_kd: 363.769
|
||||
pid_kp: 31.756 #58.437 # for 100%
|
||||
pid_ki: 1.217 #2.347 # for 100%
|
||||
pid_kd: 207.207 #363.769 # for 100%
|
||||
|
||||
#####################################################################
|
||||
# Probe
|
||||
#####################################################################
|
||||
|
||||
[probe]
|
||||
[dockable_probe]
|
||||
# Uses the PS-ON port as we ran out of endstops
|
||||
pin: PC3
|
||||
pin: PA4
|
||||
x_offset: 0
|
||||
y_offset: 26.0
|
||||
z_offset: 0
|
||||
speed: 10.0
|
||||
z_offset: 3.475
|
||||
samples: 3
|
||||
samples_result: median
|
||||
sample_retract_dist: 3.0
|
||||
samples_tolerance: 0.006
|
||||
samples_tolerance: 0.02
|
||||
samples_tolerance_retries: 3
|
||||
dock_position: 153,188
|
||||
approach_position: 153,150
|
||||
detach_position: 110,188
|
||||
z_hop: 18
|
||||
dock_retries: 3
|
||||
attach_speed: 50
|
||||
detach_speed: 15
|
||||
travel_speed: 100
|
||||
auto_attach_detach: True
|
||||
check_open_attach: True
|
||||
speed: 10.0
|
||||
lift_speed: 10
|
||||
|
||||
#####################################################################
|
||||
# Homing and Gantry Adjustment Routines
|
||||
|
@ -88,8 +104,8 @@ gantry_corners:
|
|||
# Probe points
|
||||
points:
|
||||
2,2
|
||||
2,150
|
||||
170,150
|
||||
2,130
|
||||
170,130
|
||||
170,2
|
||||
|
||||
speed: 100
|
||||
|
@ -98,6 +114,17 @@ retries: 5
|
|||
retry_tolerance: 0.0075
|
||||
max_adjust: 10
|
||||
|
||||
[bed_mesh]
|
||||
speed: 120
|
||||
horizontal_move_z: 5
|
||||
mesh_min: 2,26
|
||||
mesh_max: 170,156
|
||||
zero_reference_position: 90, 90
|
||||
probe_count: 7,7
|
||||
mesh_pps: 2,2
|
||||
algorithm: bicubic
|
||||
bicubic_tension: 0.2
|
||||
|
||||
|
||||
########################################
|
||||
# EXP1 / EXP2 (display) pins
|
||||
|
@ -146,12 +173,3 @@ aliases:
|
|||
#gcode_id:
|
||||
# See the "heater_generic" section for the definition of this
|
||||
# parameter.
|
||||
|
||||
#[z_calibration]
|
||||
#nozzle_xy_position: <X,Y position for clicking the nozzle on the z endstop - not needed if [safe_z_home] is used>
|
||||
#switch_xy_offsets: <X,Y offsets from the nozzle position for clicking the probe's switch body on the z endstop>
|
||||
#bed_xy_position: <X,Y position for probing the bed, for instance the center point - not needed if mesh with relative_reference_index is used>
|
||||
#switch_offset: <offset of the switch trigger (read the Switch Offset section!)>
|
||||
#start_gcode: <macro name for attaching the probe>
|
||||
#before_switch_gcode: <macro name for attaching the probe AFTER probing the nozzle>
|
||||
#end_gcode: <macro name for docking the probe>
|
||||
|
|
176
purge_bucket.cfg
Normal file
176
purge_bucket.cfg
Normal file
|
@ -0,0 +1,176 @@
|
|||
[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: False
|
||||
|
||||
# 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: 25 ; Amount of filament, in mm, to purge.
|
||||
variable_purge_spd: 100 ; Speed, in mm/min, of the purge.
|
||||
variable_purge_temp_min: 220 ; Minimum nozzle temperature to permit a purge. Otherwise, purge will not occur.
|
||||
variable_purge_ret: 0 ; Retract length, in mm, after purging to prevent slight oozing. Adjust as necessary.
|
||||
variable_ooze_dwell: 1 ; 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: 6.5
|
||||
|
||||
# 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: 10 ; 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: 5100 ; Travel (not cleaning) speed along x and y-axis in mm/s.
|
||||
variable_prep_spd_z: 1500 ; Travel (not cleaning) speed along z axis in mm/s.
|
||||
variable_wipe_spd_xy: 5100 ; Nozzle wipe speed in mm/s.
|
||||
|
||||
|
||||
# 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.
|
||||
variable_brush_start: 32
|
||||
|
||||
# This value is defaulted from brush location in CAD (rear left). Change if your brush width is different.
|
||||
variable_brush_width: 30
|
||||
|
||||
## 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: 179
|
||||
variable_brush_depth: 4
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
# 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: 24
|
||||
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: 3
|
||||
|
||||
|
||||
###############################################################################################################################################
|
||||
###############################################################################################################################################
|
||||
|
||||
### 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 %}
|
||||
|
||||
## 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}
|
||||
|
||||
### 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))} F{prep_spd_xy}
|
||||
|
||||
### 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 %}
|
||||
|
||||
### 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}
|
||||
G92 E0 ; reset extruder before retract
|
||||
G1 E-{purge_ret} F{purge_spd * 5}
|
||||
G4 P{ooze_dwell * 1000}
|
||||
{% 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.
|
||||
M117 Cleaned!
|
||||
G1 Z{brush_top + clearance_z} F{prep_spd_z}
|
||||
|
||||
## Restore the gcode state to how it was before the macro.
|
||||
RESTORE_GCODE_STATE NAME=clean_nozzle MOVE=1 MOVE_SPEED=500
|
||||
|
||||
{% 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 %}
|
|
@ -44,14 +44,13 @@ axes: xyz
|
|||
gcode:
|
||||
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
|
||||
|
||||
{% if home_all or 'Y' in params %}
|
||||
SENSORLESS_HOME_Y
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'X' in params %}
|
||||
SENSORLESS_HOME_X
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Y' in params %}
|
||||
SENSORLESS_HOME_Y
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Z' in params %}
|
||||
G90 # Absolute positioning
|
||||
|
|
20
steppers.cfg
20
steppers.cfg
|
@ -23,7 +23,6 @@ homing_retract_dist: 0 # Must set 0 for sensorless
|
|||
uart_pin: PD0
|
||||
interpolate: false
|
||||
run_current: 0.6
|
||||
stealthchop_threshold: 0
|
||||
|
||||
diag_pin: ^PC1
|
||||
driver_SGTHRS: 110 # 255 is most sensitive value, 0 is least sensitive
|
||||
|
@ -49,7 +48,6 @@ homing_retract_dist: 0 # Must set 0 for sensorless
|
|||
uart_pin: PF8
|
||||
interpolate: false
|
||||
run_current: 0.6
|
||||
stealthchop_threshold: 0
|
||||
|
||||
diag_pin: ^PC2
|
||||
driver_SGTHRS: 125 # 255 is most sensitive value, 0 is least sensitive
|
||||
|
@ -84,7 +82,7 @@ homing_retract_dist: 3
|
|||
uart_pin: PC10
|
||||
interpolate: false
|
||||
run_current: 0.6
|
||||
stealthchop_threshold: 0
|
||||
stealthchop_threshold: 999999
|
||||
|
||||
## Z1 Stepper - Rear Left
|
||||
## Connected to MOTOR_2
|
||||
|
@ -100,7 +98,7 @@ microsteps: 32
|
|||
uart_pin: PF13
|
||||
interpolate: false
|
||||
run_current: 0.6
|
||||
stealthchop_threshold: 0
|
||||
stealthchop_threshold: 999999
|
||||
|
||||
## Z2 Stepper - Rear Right
|
||||
## Connected to MOTOR_3
|
||||
|
@ -117,7 +115,7 @@ uart_pin: PF9
|
|||
interpolate: false
|
||||
run_current: 0.6
|
||||
sense_resistor: 0.110
|
||||
stealthchop_threshold: 0
|
||||
stealthchop_threshold: 999999
|
||||
|
||||
## Z3 Stepper - Front Right
|
||||
## Connected to MOTOR_4
|
||||
|
@ -134,7 +132,7 @@ uart_pin: PD4
|
|||
interpolate: false
|
||||
run_current: 0.6
|
||||
sense_resistor: 0.110
|
||||
stealthchop_threshold: 0
|
||||
stealthchop_threshold: 999999
|
||||
|
||||
|
||||
#####################################################################
|
||||
|
@ -169,13 +167,13 @@ max_temp: 350
|
|||
max_power: 1.0
|
||||
min_extrude_temp: 170
|
||||
control = pid
|
||||
pid_kp = 26.213
|
||||
pid_ki = 1.304
|
||||
pid_kd = 131.721
|
||||
pid_kp = 19.409
|
||||
pid_ki = 0.764
|
||||
pid_kd = 123.734
|
||||
|
||||
## E0 on MOTOR7
|
||||
[tmc2209 extruder]
|
||||
uart_pin: PD14
|
||||
interpolate: false
|
||||
run_current: 0.3
|
||||
stealthchop_threshold: 0
|
||||
run_current: 0.35
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue