105 lines
3.6 KiB
INI
105 lines
3.6 KiB
INI
###############################################################################
|
|
## NOZZLE WIPER - A nozzle purge bucket and brush for the Voron 0.1 and other
|
|
## printers for ants
|
|
##
|
|
## Configuration:
|
|
##
|
|
## 1. Set the correct PWM pin that you connected the Orange wire
|
|
## to in the [servo wipeServo] section replacing XXNN
|
|
## 2. Home X, Y and Z axes
|
|
## 3. Lower Z by at least 50mm
|
|
## 4. Run the NW_DEPLOY macro and ensure the servo extends the arm 90 degrees
|
|
## 5. Use the printer controls to move the nozzle so that it is inline with
|
|
## the brush on the X axis and so that it is in the centre of the purge
|
|
## bucket on the Y axis
|
|
## 7. Run M114 to get the nozzle position and set variable_x and variable_y.
|
|
## If you do not set these values the macro will fail as the defaults are
|
|
## deliberately wrong
|
|
## 8. Move the nozzle into the center of the brush and raise the mount on
|
|
## the extrusion until the nozzle just rests into the brush. Do not let the
|
|
## brush touch the sock or it'll wear it out prematurely
|
|
## 9. Move the nozzle out of the way from the brush and purge bucket
|
|
## 10. Run NW_RETRACT and ensure the servo moves the arm back away to the side
|
|
##
|
|
## Testing:
|
|
##
|
|
## 1. Heat the nozzle to the printing temperature of the loaded filament
|
|
## 2. Home all axes
|
|
## 3. Be prepared to hit the Emergency Stop button if things don't go as they
|
|
## should
|
|
## 4. Run NW_CLEAN_NOZZLE
|
|
##
|
|
## That should be all changes needed. Call the NW_CLEAN_NOZZLE macro from
|
|
## the end of your START_PRINT macro to wipe the nozzle clean before printing
|
|
###############################################################################
|
|
|
|
[servo wipeServo]
|
|
pin: XXNN
|
|
minimum_pulse_width: 0.0005
|
|
maximum_servo_angle: 180
|
|
|
|
[gcode_macro NW_CLEAN_NOZZLE]
|
|
gcode:
|
|
{% if "xyz" in printer.toolhead.homed_axes %}
|
|
SAVE_GCODE_STATE NAME=NW_CLEAN_NOZZLE
|
|
G90
|
|
NW_DEPLOY
|
|
NW_PURGE
|
|
NW_WIPE
|
|
NW_RETRACT
|
|
RESTORE_GCODE_STATE NAME=NW_CLEAN_NOZZLE
|
|
{% else %}
|
|
{ action_raise_error("Home All Axis First") }
|
|
M117 Home All Axis First
|
|
{% endif %}
|
|
|
|
[gcode_macro NW_BUCKET_POS]
|
|
# Sensible values for variable_x would be 0, but adjust as per the instructions
|
|
variable_x: -1000
|
|
# Sensible values for variable_y would be around 90, but adjust as per the instructions
|
|
variable_y: -1000
|
|
# Sensible value for variable_z is 50
|
|
variable_z: 50
|
|
gcode:
|
|
M118 bucket pos X:{printer["gcode_macro NW_BUCKET_POS"].x} Y:{printer["gcode_macro NW_BUCKET_POS"].y} Z:{printer["gcode_macro NW_BUCKET_POS"].z}
|
|
|
|
[gcode_macro NW_DEPLOY]
|
|
gcode:
|
|
G90
|
|
G0 Z{printer["gcode_macro NW_BUCKET_POS"].z}
|
|
SET_SERVO SERVO=wipeServo ANGLE=15
|
|
G4 P500
|
|
|
|
[gcode_macro NW_RETRACT]
|
|
gcode:
|
|
SET_SERVO SERVO=wipeServo ANGLE=120
|
|
SET_SERVO SERVO=wipeServo WIDTH=0 # OFF
|
|
G4 P500
|
|
|
|
[gcode_macro NW_WIPE]
|
|
gcode:
|
|
G90
|
|
G0 Z{printer["gcode_macro NW_BUCKET_POS"].z} F5000
|
|
G0 X{printer["gcode_macro NW_BUCKET_POS"].x} Y{printer["gcode_macro NW_BUCKET_POS"].y - 25} F5000
|
|
{% for wipes in range(1, 4) %}
|
|
G0 Y{printer["gcode_macro NW_BUCKET_POS"].y - 25} F{2000}
|
|
G0 Y{printer["gcode_macro NW_BUCKET_POS"].y - 55} F{2000}
|
|
{% endfor %}
|
|
G0 X60 F5000
|
|
G0 Y60 F5000
|
|
|
|
[gcode_macro NW_PURGE]
|
|
gcode:
|
|
G90
|
|
G0 Z{printer["gcode_macro NW_BUCKET_POS"].z} F5000
|
|
G0 X{printer["gcode_macro NW_BUCKET_POS"].x} Y{printer["gcode_macro NW_BUCKET_POS"].y} F5000
|
|
{% if printer.extruder.temperature >= 180 %}
|
|
M83
|
|
G1 E10 F150
|
|
G1 E-2 F{150 * 750}
|
|
G4 P{2000}
|
|
G92 E0
|
|
{% else %}
|
|
{ action_raise_error("Nozzle Temp must be > 180C") }
|
|
{% endif %}
|