v2.4: update ercf
This commit is contained in:
parent
c0a221b5d5
commit
bc630f84aa
2 changed files with 27 additions and 30 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
[ercf]
|
||||
# Encoder
|
||||
# encoder_pin: ^P1.0
|
||||
encoder_pin: ercf:PA6 # easy brd
|
||||
# encoder_resolution: 1.365188 # default
|
||||
encoder_resolution: 1.349528 # from `ercf_calibrate_encoder`
|
||||
|
@ -239,13 +238,17 @@ gcode:
|
|||
[gcode_macro ERCF_UNLOCK]
|
||||
description: Unlock ERCF operations
|
||||
gcode:
|
||||
M118 Unlock the ERCF
|
||||
SET_GCODE_VARIABLE MACRO=ERCF_PAUSE VARIABLE=is_paused VALUE=0
|
||||
UPDATE_DELAYED_GCODE ID=disable_heater DURATION=0
|
||||
ERCF_UNSELECT_TOOL
|
||||
M104 S{printer["gcode_macro ERCF_PAUSE"].extruder_temp}
|
||||
RESTORE_GCODE_STATE NAME=ERCF_state
|
||||
M118 Refer to the manual before resuming the print
|
||||
M118 Unlock the ERCF
|
||||
SET_GCODE_VARIABLE MACRO=ERCF_PAUSE VARIABLE=is_paused VALUE=0
|
||||
UPDATE_DELAYED_GCODE ID=disable_heater DURATION=0
|
||||
{% if printer['filament_switch_sensor toolhead_sensor'].filament_detected == False %}
|
||||
ERCF_UNSELECT_TOOL
|
||||
{% else %}
|
||||
ERCF_UNSELECT_TOOL FORCED=0
|
||||
{% endif %}
|
||||
M104 S{printer["gcode_macro ERCF_PAUSE"].extruder_temp}
|
||||
RESTORE_GCODE_STATE NAME=ERCF_state
|
||||
M118 Refer to the manual before resuming the print
|
||||
|
||||
[delayed_gcode disable_heater]
|
||||
gcode:
|
||||
|
@ -426,7 +429,7 @@ description: Eject the filament during a print and park it into the ERCF
|
|||
gcode:
|
||||
{% if printer["gcode_macro ERCF_PAUSE"].is_paused|int == 0 %}
|
||||
{% if printer["gcode_macro ERCF_SELECT_TOOL"].color_selected|int != -1 %}
|
||||
M118 ERCF_UNLOAD_TOOL Unload tool {printer["gcode_macro ERCF_SELECT_TOOL"].color_selected|int} ...
|
||||
M118 Unload tool {printer["gcode_macro ERCF_SELECT_TOOL"].color_selected|int} ...
|
||||
ERCF_HOME_EXTRUDER
|
||||
ERCF_SELECT_TOOL TOOL={printer["gcode_macro ERCF_SELECT_TOOL"].color_selected|int}
|
||||
{% set ercf_params = printer.save_variables.variables %}
|
||||
|
@ -435,7 +438,6 @@ gcode:
|
|||
G92 E0
|
||||
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
|
||||
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float} SPEED=25 ACCEL=0 SYNC=0
|
||||
M118 ERCF_UNLOAD_TOOL G1 E-{printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float} F1500.0
|
||||
G1 E-{printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float} F1500.0
|
||||
{% set ercf_params = printer.save_variables.variables %}
|
||||
ERCF_UNLOAD LENGTH={ercf_params.ercf_calib_ref|float - printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float + printer["gcode_macro ERCF_VAR"].unload_modifier|float}
|
||||
|
@ -481,15 +483,15 @@ variable_color_selected: -1
|
|||
gcode:
|
||||
{% if printer["gcode_macro ERCF_PAUSE"].is_paused|int == 0 %}
|
||||
{% if printer["gcode_macro ERCF_HOME"].home != -1 %}
|
||||
M118 ERCF_SELECT_TOOL Select Tool {params.TOOL} ...
|
||||
M118 Select Tool {params.TOOL} ...
|
||||
ERCF_SERVO_UP
|
||||
MANUAL_STEPPER STEPPER=selector_stepper MOVE={printer["gcode_macro ERCF_VAR"].colorselector[params.TOOL|int]}
|
||||
SET_GCODE_VARIABLE MACRO=ERCF_SELECT_TOOL VARIABLE=tool_selected VALUE={params.TOOL}
|
||||
SET_GCODE_VARIABLE MACRO=ERCF_SELECT_TOOL VARIABLE=color_selected VALUE={params.TOOL}
|
||||
ERCF_SERVO_DOWN
|
||||
M118 ERCF_SELECT_TOOL Tool {params.TOOL} Enabled
|
||||
M118 Tool {params.TOOL} Enabled
|
||||
{% else %}
|
||||
M118 ERCF_SELECT_TOOL Could not select tool, ERCF is not homed
|
||||
M118 Could not select tool, ERCF is not homed
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -506,7 +508,7 @@ gcode:
|
|||
{% endif %}
|
||||
ERCF_SET_STEPS RATIO=1.0
|
||||
{% else %}
|
||||
M118 ERCF_UNSELECT_TOOL Could not unselect tool, ERCF is not homed
|
||||
M118 Could not unselect tool, ERCF is not homed
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
@ -521,7 +523,6 @@ description: Load filament from the toolhead entrance to the nozzle
|
|||
gcode:
|
||||
{% if printer["gcode_macro ERCF_PAUSE"].is_paused|int == 0 %}
|
||||
{% if printer.extruder.temperature > printer["gcode_macro ERCF_VAR"].min_temp_extruder %}
|
||||
M118 ERCF_LOAD_F_I_E Loading Filament...
|
||||
G91
|
||||
G92 E0
|
||||
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
|
||||
|
@ -535,9 +536,8 @@ gcode:
|
|||
G1 E5 F600
|
||||
G92 E0
|
||||
G90
|
||||
M118 ERCF_LOAD_F_I_E Load Complete
|
||||
{% else %}
|
||||
M118 ERCF_LOAD_F_I_E Extruder too cold
|
||||
M118 Extruder too cold
|
||||
ERCF_PAUSE
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -649,7 +649,7 @@ gcode:
|
|||
{% if printer["gcode_macro ERCF_PAUSE"].is_paused|int == 0 %}
|
||||
{% if printer.extruder.temperature > printer["gcode_macro ERCF_VAR"].min_temp_extruder %}
|
||||
{% if printer["gcode_macro ERCF_SELECT_TOOL"].tool_selected|int == -1 %}
|
||||
M118 ERCR_U_F_IEWTF Forming filament tip and Unloading Filament...
|
||||
M118 Forming filament tip and Unloading Filament...
|
||||
G91
|
||||
ERCF_FORM_TIP_STANDALONE
|
||||
G1 E-4.00 F1200.0
|
||||
|
@ -661,13 +661,13 @@ gcode:
|
|||
MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0
|
||||
MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float} SPEED=25 ACCEL=0 SYNC=0
|
||||
G1 E-{printer["gcode_macro ERCF_VAR"].end_of_bowden_to_sensor|float} F1500.0
|
||||
M118 ERCF_U_F_FIEWTF Filament removed
|
||||
M118 Filament removed
|
||||
{% else %}
|
||||
M118 Tool selected, UNSELECT it
|
||||
ERCF_PAUSE
|
||||
{% endif %}
|
||||
{% else %}
|
||||
M118 ERCF_U_F_FIEWTF Extruder too cold
|
||||
M118 Extruder too cold
|
||||
ERCF_PAUSE
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -680,9 +680,9 @@ gcode:
|
|||
[gcode_macro ERCF_IS_FILAMENT_IN_EXTRUDER]
|
||||
gcode:
|
||||
{% if printer['filament_switch_sensor toolhead_sensor'].filament_detected == True %}
|
||||
M118 ERCF_IS_F_IE Filament is in extruder
|
||||
M118 Filament is in extruder
|
||||
{% else %}
|
||||
M118 ERCF_IS_F_IE Filament not in extruder
|
||||
M118 Filament not in extruder
|
||||
ERCF_PAUSE
|
||||
{% endif %}
|
||||
|
||||
|
@ -690,10 +690,10 @@ gcode:
|
|||
[gcode_macro ERCF_IS_FILAMENT_STUCK_IN_ERCF]
|
||||
gcode:
|
||||
{% if printer.ercf.encoder_pos|float != 0 %}
|
||||
M118 ERCF_IS_F_SIE Filament stuck in ERCF
|
||||
M118 Filament stuck in ERCF
|
||||
ERCF_PAUSE
|
||||
{% else %}
|
||||
M118 ERCF_IS_F_SIE Filament not in ERCF
|
||||
M118 Filament not in ERCF
|
||||
{% endif %}
|
||||
|
||||
############################################
|
||||
|
@ -704,9 +704,9 @@ gcode:
|
|||
[gcode_macro ERCF_EJECT_UNKNOW_STATE]
|
||||
description: Unload filament from an unknown position
|
||||
gcode:
|
||||
M118 EJECT_US Eject Filament if loaded ...
|
||||
M118 Eject Filament if loaded ...
|
||||
{% if printer['filament_switch_sensor toolhead_sensor'].filament_detected == True %}
|
||||
M118 ERCF_EJECT_US Filament in extruder, trying to eject it ..
|
||||
M118 Filament in extruder, trying to eject it ..
|
||||
{% set extruder_eject_temp = printer["gcode_macro ERCF_VAR"].extruder_eject_temp %}
|
||||
{% if printer['extruder'].temperature < extruder_eject_temp %}
|
||||
M118 Preheat Nozzle to {extruder_eject_temp}
|
||||
|
@ -752,11 +752,8 @@ gcode:
|
|||
{% endif %}
|
||||
M118 Homing ERCF ...
|
||||
QUERY_ENDSTOPS
|
||||
M118 ERCF_EJECT_UNKNOW_STATE
|
||||
ERCF_EJECT_UNKNOW_STATE
|
||||
M118 ERCF_HOME_SELECTOR
|
||||
ERCF_HOME_SELECTOR
|
||||
M118 ERCF_HOME_ONLY
|
||||
ERCF_HOME_ONLY
|
||||
|
||||
[gcode_macro ERCF_HOME_SELECTOR]
|
||||
|
|
|
@ -11,5 +11,5 @@ ercf_calib_6 = 1.0
|
|||
ercf_calib_7 = 1.0
|
||||
ercf_calib_8 = 1.0
|
||||
ercf_calib_9 = 1.0
|
||||
ercf_calib_ref = 967.611576
|
||||
ercf_calib_ref = 970.985396
|
||||
|
||||
|
|
Loading…
Reference in a new issue