mirror of
https://github.com/sorted01/Filametrix.git
synced 2026-01-01 12:55:57 -05:00
Update ercf_additional.cfg
Fixed cutting gcode
This commit is contained in:
parent
fc8f174f36
commit
b00dfaf8a7
1 changed files with 13 additions and 58 deletions
|
|
@ -8,8 +8,8 @@ variable_retract_length: 35
|
||||||
|
|
||||||
# The location of the pin, this should be the position of the toolhead when the cutter
|
# The location of the pin, this should be the position of the toolhead when the cutter
|
||||||
# just lightly touches the pin
|
# just lightly touches the pin
|
||||||
variable_pin_loc_x: 21
|
variable_pin_loc_x: 13
|
||||||
variable_pin_loc_y: 19
|
variable_pin_loc_y: 56
|
||||||
|
|
||||||
# The starting and end positions when making the cut
|
# The starting and end positions when making the cut
|
||||||
# In particular, instead of making the cut by traveling to the pin location above,
|
# In particular, instead of making the cut by traveling to the pin location above,
|
||||||
|
|
@ -19,17 +19,17 @@ variable_pin_park_x_dist: 5.0
|
||||||
|
|
||||||
# Position of the toolhead when the cutter is fully compressed
|
# Position of the toolhead when the cutter is fully compressed
|
||||||
# Should leave a small headroom to avoid banging the toolhead or gantry
|
# Should leave a small headroom to avoid banging the toolhead or gantry
|
||||||
variable_pin_loc_x_compressed: 5.0
|
variable_pin_loc_x_compressed: 0
|
||||||
|
|
||||||
# Speed related settings
|
# Speed related settings
|
||||||
# Note that if the cut speed is too fast, the steppers can lose steps
|
# Note that if the cut speed is too fast, the steppers can lose steps
|
||||||
# Therefore, for a cut:
|
# Therefore, for a cut:
|
||||||
# - We first make a fast move to accumulate some momentum and get the cut blade to the initial contact with the filament
|
# - We first make a fast move to accumulate some momentum and get the cut blade to the initial contact with the filament
|
||||||
# - We then make a slow move for the actual cut to happen
|
# - We then make a slow move for the actual cut to happen
|
||||||
variable_travel_spd: 7800
|
variable_travel_spd: 18000
|
||||||
variable_cut_fast_move_spd: 2000
|
variable_cut_fast_move_spd: 4000
|
||||||
variable_cut_slow_move_spd: 500
|
variable_cut_slow_move_spd: 800
|
||||||
variable_evacuate_speed: 7800
|
variable_evacuate_speed: 18000
|
||||||
variable_cut_dwell_time: 200 # time to dwell at the cut point in ms
|
variable_cut_dwell_time: 200 # time to dwell at the cut point in ms
|
||||||
variable_cut_fast_move_fraction: 0.5 # fraction of the move that uses fast move
|
variable_cut_fast_move_fraction: 0.5 # fraction of the move that uses fast move
|
||||||
|
|
||||||
|
|
@ -39,28 +39,12 @@ variable_cut_fast_move_fraction: 0.5 # fraction of the move that uses fast move
|
||||||
variable_safe_margin_x: 30
|
variable_safe_margin_x: 30
|
||||||
variable_safe_margin_y: 30
|
variable_safe_margin_y: 30
|
||||||
|
|
||||||
# Whether or not to make a second cut
|
#this is the length of filament to move after filament has been cut, just need enough to move it away from the cutting slot.
|
||||||
# The goal of the second cut is to avoid filament adding friction to the blade causing the lever unable to decompress
|
variable_cut_retract_length: 2
|
||||||
# If set to a positive value, we first retract this amount, make the second cut, then extrude back
|
|
||||||
# Set to 0 to disable to second cut
|
|
||||||
# You should only enable this if you cannot get the lever to reliabily decompress.
|
|
||||||
variable_second_cut_retract_length: 0
|
|
||||||
|
|
||||||
# Whether to eject the filament at the end
|
# Whether to eject the filament at the end
|
||||||
variable_final_eject: 0
|
variable_final_eject: 0
|
||||||
|
|
||||||
# Currently ERCF software assumes that tip forming move always moves the extruder (and consequently the encoder)
|
|
||||||
# Ideally, we should bring formal support of filament cutters to the ERCF software
|
|
||||||
# In the short term, we perform a "hack" where we wiggle the extruder a little after cutting,
|
|
||||||
# if the extruder did not make enough movement during the filament cutting phase.
|
|
||||||
variable_extruder_minimum_movement: 0 # the minimum extruder movement required for this tip forming move, this depends on the minimum distance that the encoder can reliably detect
|
|
||||||
# setting it to a lower value requires the ERCF encoder to be more sensitive.
|
|
||||||
variable_extruder_wiggle_length: 10 # the length to retract -> extrude during a wiggle, this needs to be large enough for the encoder to detect the movement
|
|
||||||
variable_extruder_wiggle_repeat: 3 # number of repeats for the wiggle
|
|
||||||
|
|
||||||
# State variables
|
|
||||||
variable_retracted_length_: 0 # a state variable to keep track of how much we have retracted during the last cut, this is useful for restoring the filament position
|
|
||||||
|
|
||||||
gcode:
|
gcode:
|
||||||
{% set RETRACT_LENGTH = params.RETRACT_LENGTH | default(printer['gcode_macro CUT_FILAMENT']['retract_length']) | float %}
|
{% set RETRACT_LENGTH = params.RETRACT_LENGTH | default(printer['gcode_macro CUT_FILAMENT']['retract_length']) | float %}
|
||||||
{% set FINAL_EJECT = params.FINAL_EJECT | default(printer['gcode_macro CUT_FILAMENT']['final_eject'], True) | int %}
|
{% set FINAL_EJECT = params.FINAL_EJECT | default(printer['gcode_macro CUT_FILAMENT']['final_eject'], True) | int %}
|
||||||
|
|
@ -85,34 +69,17 @@ gcode:
|
||||||
G1 E-{RETRACT_LENGTH} F3000 # retract to save filament waste
|
G1 E-{RETRACT_LENGTH} F3000 # retract to save filament waste
|
||||||
{% set _extruder_moved_dist = _extruder_moved_dist + RETRACT_LENGTH %}
|
{% set _extruder_moved_dist = _extruder_moved_dist + RETRACT_LENGTH %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
SET_GCODE_VARIABLE macro=CUT_FILAMENT variable=retracted_length_ value={RETRACT_LENGTH}
|
|
||||||
|
|
||||||
G90 # absolute positioning
|
G90 # absolute positioning
|
||||||
_MOVE_TO_CUTTER_PIN PIN_PARK_X_LOC={pin_park_x_loc} PIN_PARK_Y_LOC={pin_park_y_loc}
|
_MOVE_TO_CUTTER_PIN PIN_PARK_X_LOC={pin_park_x_loc} PIN_PARK_Y_LOC={pin_park_y_loc}
|
||||||
|
|
||||||
# Make the main cut
|
# Make the main cut
|
||||||
_DO_CUT_MOTION PIN_PARK_X_LOC={pin_park_x_loc}
|
_DO_CUT_MOTION PIN_PARK_X_LOC={pin_park_x_loc}
|
||||||
# Optional secondary cut to help decompressing the lever
|
|
||||||
{% if second_cut_retract_length > 0 %}
|
|
||||||
G1 E-{second_cut_retract_length} F3000
|
|
||||||
_DO_CUT_MOTION PIN_PARK_X_LOC={pin_park_x_loc}
|
|
||||||
G1 E{second_cut_retract_length} F3000
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if FINAL_EJECT == 1 %}
|
G1 E-{cut_retract_length} F3000 #moves filament after cut, but not past the toolhead sensor
|
||||||
G1 E-80 F3000
|
|
||||||
{% set _extruder_moved_dist = _extruder_moved_dist + 80 %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if _extruder_moved_dist < extruder_minimum_movement %}
|
M400
|
||||||
# make some wiggle moves so that the encoder catch them
|
M117 Filament cut!
|
||||||
{% for _ in range(extruder_wiggle_repeat) %}
|
|
||||||
G1 E-{extruder_wiggle_length} F3000
|
|
||||||
G1 E{extruder_wiggle_length} F3000
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
SET_PRESSURE_ADVANCE ADVANCE={prev_pa} # restore PA
|
|
||||||
RESTORE_GCODE_STATE NAME=cut_filament_state
|
RESTORE_GCODE_STATE NAME=cut_filament_state
|
||||||
|
|
||||||
[gcode_macro _MOVE_TO_CUTTER_PIN]
|
[gcode_macro _MOVE_TO_CUTTER_PIN]
|
||||||
|
|
@ -149,18 +116,6 @@ gcode:
|
||||||
G4 P{cut_dwell_time}
|
G4 P{cut_dwell_time}
|
||||||
G1 X{pin_park_x_loc} F{evacuate_speed} # evacuate
|
G1 X{pin_park_x_loc} F{evacuate_speed} # evacuate
|
||||||
|
|
||||||
[gcode_macro restore_cutted_filament]
|
|
||||||
description: extrudes an amount equal (or proportional) to the retraction during the last cut
|
|
||||||
gcode:
|
|
||||||
SAVE_GCODE_STATE NAME=restore_cutted_filament_state
|
|
||||||
{% set RETRACTED_LENGTH = printer['gcode_macro CUT_FILAMENT']['retracted_length_'] | float %}
|
|
||||||
M83 # relative extrusion
|
|
||||||
G1 E{RETRACTED_LENGTH} F3000
|
|
||||||
SET_GCODE_VARIABLE macro=CUT_FILAMENT variable=retracted_length_ value=0 # clear the retracted amount
|
|
||||||
RESTORE_GCODE_STATE NAME=restore_cutted_filament_state
|
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro _ERCF_FORM_TIP_STANDALONE]
|
[gcode_macro _ERCF_FORM_TIP_STANDALONE]
|
||||||
gcode:
|
gcode:
|
||||||
CUT_FILAMENT {rawparams}
|
CUT_FILAMENT {rawparams}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue