-
Notifications
You must be signed in to change notification settings - Fork 0
/
macro-wipe_line.cfg
35 lines (33 loc) · 1.1 KB
/
macro-wipe_line.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Modern Tinkerer - https://github.com/Modern-Tinkerer
#
#####################################################################
#####################################################################
# Nozzle Wipe Line
#####################################################################
#####################################################################
[gcode_macro WIPE_LINE]
gcode:
{% set N = params.N|default(0.4)|float %}
{% if printer.toolhead.homed_axes != "xyz" %}
{printer.gcode.action_respond_info("Please home XYZ first")}
{% elif printer.extruder.temperature < 170 %}
{printer.gcode.action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=WIPE_LINE_state
M82
G90
G92 E0
G1 X350 Y300 F5000 ; move to starting location
G1 Z{N*0.75} F240
G92 E0
G1 X350 Y200 E9.5 F1500 ; prime the nozzle
G92 E0
G1 X{350+(N*2)} F1500
G1 X{350+(N*2)} Y300 E9.5 F1500 ; wipe backward
G92 E0
G1 X{350+N} F1500
G1 X{350+N} Y155 E11 F1500 ; wipe forward
G92 E0
RESTORE_GCODE_STATE NAME=WIPE_LINE_state
{% endif %}