Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The New Start Update #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 48 additions & 15 deletions positron_macros.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ gcode:
{% set x_center = (printer.toolhead.axis_maximum.x|float + printer.toolhead.axis_minimum.x|float) / 2.0 %}
{% set y_center = (printer.toolhead.axis_maximum.y|float + printer.toolhead.axis_minimum.y|float) / 2.0 %}
G90
G1 X{x_center} Y{y_center} F7800
G0 X{x_center} Y{x_center} F7800
smiksky marked this conversation as resolved.
Show resolved Hide resolved


[gcode_macro FRONT]
Expand All @@ -191,19 +191,31 @@ gcode:
{% set x_center = (printer.toolhead.axis_maximum.x|float + printer.toolhead.axis_minimum.x|float) / 2.0 %}
{% set y_front = printer.toolhead.axis_maximum.y|float - 10 %}
G90
G1 X{x_center} Y{y_front} F7800
G0 X{x_center} Y{y_front} F7800


[gcode_macro LOAD_POSITION]
description: Move the toolhead to the front left corner
gcode:
G28 X Y O
{% set x_left = printer.toolhead.axis_minimum.x|float + 10 %}
{% set y_front = printer.toolhead.axis_maximum.y|float - 10 %}
G90
G0 X{x_left} Y{y_front} F7800


#####################################################################
# Filament Macros
#####################################################################

[gcode_macro M600]
description: Temporary self-service M600: PAUSE and UNLOAD_FILAMENT
gcode:
PAUSE
RESPOND MSG="Unloading filament, reload before resuming"
UNLOAD_FILAMENT
[gcode_macro _FILAMENT_CHANGE_VARIABLES]
variable_preload_speed: 400
variable_preload_distance: 30
variable_load_speed: 2000
variable_load_distance: 300
variable_prime_speed: 200
variable_prime_distamce: 30
gcode:


[gcode_macro UNLOAD_FILAMENT]
Expand All @@ -213,10 +225,13 @@ gcode:
{% set MIN_TEMP = params.TEMP|default(210)|float * 0.98 %}
{% set CURRENT_TARGET = printer.extruder.target|float %}
SAVE_GCODE_STATE NAME=UNLOAD_FILAMENT
G28 O
G91 ; relative positioning
G1 Z20 ; move nozzle upwards
FRONT ; move the toolhead to the front

;Set EXTRUDER_TEMP
M104 S{EXTRUDER_TEMP}

;Home if needed (per axis) and move to load position
G28 X Y Z O
LOAD_POSITION

{% if EXTRUDER_TEMP != 0 %}
LED_PENDING
Expand All @@ -227,13 +242,13 @@ gcode:
{% endif %}
LED_WORKING
M83 ; set extruder to relative mode
G1 E10 F300 ; extrude a little to soften tip
G1 E-30 F3600 ; quickly retract a small amount to elimate stringing
G0 E10 F300 ; extrude a little to soften tip
G0 E-30 F3600 ; quickly retract a small amount to elimate stringing
G4 P200 ; pause for a short amount of time
G1 E-400 F1200 ; retract slowly the rest of the way
M400 ; wait for moves to finish
RESTORE_GCODE_STATE NAME=UNLOAD_FILAMENT
M300 P400 ; long beep to indicate unload complete
M300 P400 ; beep to indicate unload complete
M117 Unload Complete!
LED_READY

Expand Down Expand Up @@ -274,6 +289,17 @@ gcode:
LED_READY


[gcode_macro M600]
description: Implements M600 gcode (pause & filament change)
gcode:
SAVE_GCODE_STATE NAME=M600
PAUSE
UNLOAD_FILAMENT
LOAD_FILAMENT
RESUME
RESTORE_GCODE_STATE NAME=M600


#####################################################################
# Print Macros
#####################################################################
Expand Down Expand Up @@ -407,6 +433,13 @@ gcode:
SET_LED LED=_indicator RED=0 GREEN=0.4 BLUE=0.2 INDEX=3


[gcode_macro LED_ALERT]
description: sets the _indicators to yellow
gcode:
SET_LED LED=_indicator RED=0.6 GREEN=0.6 BLUE=0 INDEX=1 TRANSMIT=0
SET_LED LED=_indicator RED=0.6 GREEN=0.6 BLUE=0 INDEX=3


[gcode_macro LED_WORKING]
description: sets the _indicators to purple
gcode:
Expand Down