-
Notifications
You must be signed in to change notification settings - Fork 1
/
euclid.cfg
121 lines (108 loc) · 4.09 KB
/
euclid.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# This is a modified set of macros pulled from the Euclid site, it works for me but please do some checks to
# ensure this works for your printer too before using! These macros rely on setting a new var in your config
# and in your start gcode `printer["gcode_macro RatOS"].start_of_print`. Set it to `False` in your config
# and `True` in your start gcode.
# Macro to perform a modified z_tilt
[gcode_macro Z_TILT_ADJUST]
rename_existing: Z_TILT_ADJUST_ORIGINAL # Assign new name to old function so calls to old function get new treatment
gcode:
GRAB_EUCLID
Z_TILT_ADJUST_ORIGINAL ; check bed level
STOW_EUCLID
# Macro to perform a modified bed mesh calibration
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BED_MESH_CALIBRATE_ORIGINAL # Assign new name to old function so calls to old function get new treatment
gcode:
SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=start_of_print VALUE=False ; We should be done with the probe at this stage
GRAB_EUCLID
BED_MESH_CALIBRATE_ORIGINAL { rawparams } ; check bed level
STOW_EUCLID
[homing_override]
# needs force_move enabled for kinematic position function
axes: z
gcode:
SET_KINEMATIC_POSITION Z=0
M118 Starting homing process
G91 ; relative coordinate system
G0 Z15 F500 ; raise bed to z15
M118 Homing Y axis
G28 Y
M118 Homing X axis
G28 X
GRAB_EUCLID
_MOVE_TO_CENTER ; move to center of the bed
M400 ; wait for moves to complete
M118 Homing Z axis
G28 Z ; home Z
G0 z15 F500 ; raise bed to z15
STOW_EUCLID
# Checks to see if we have the probe before trying to grab it
[gcode_macro GRAB_EUCLID]
gcode:
QUERY_PROBE
M401
# Checks to see if we have the probe before trying to stow it
[gcode_macro STOW_EUCLID]
gcode:
QUERY_PROBE
M402
# Macro to Deploy Bed Probe
[gcode_macro M401]
gcode:
{% if printer.probe.last_query %}
G90
M118 Grabbing probe
G0 z15 F4000 ; set approach elevation of z15
_MOVE_TO_DOCK_CORNER ; move to common start point
_MOVE_TO_DOCK_SIDE ; move to side of dock to pickup probe
_MOVE_TO_DOCK ; translate over probe pickup location
G4 P500 ; pause for firmware detection
_MOVE_OUT_OF_DOCK ; move probe out of dock
G0 z15 F4000 ; raise to elevation of z15
{% else %}
M117 Already deployed
{% endif %}
# Macro to Stow Bed Leveling Probe, if `printer["gcode_macro RatOS"].start_of_print` is set to "true"
# We assume we're at the start of a print and still doing things with the probe, so we skip docking it.
[gcode_macro M402]
gcode:
{% if not printer.probe.last_query and printer["gcode_macro RatOS"].start_of_print|lower == "false" %}
G90
M118 Stowing probe
G0 z15 F4000 ; set approach elevation of z15
_MOVE_TO_DOCK_CORNER ; move to common start point
_MOVE_OUT_OF_DOCK ; move toolhead to dock exit position
_MOVE_TO_DOCK ; move probe into to dock
G4 P250 ; pause
_MOVE_TO_DOCK_SIDE ; swipe probe off
G4 P250 ; pause
G0 z15 F4000 ; move up to elevation of z15
_MOVE_TO_CENTER
{% else %}
M117 Already docked
{% endif %}
[gcode_macro _MOVE_TO_DOCK]
gcode:
G90 ; absolute coordinate system
G0 x5 Y4 z15 ; move to X5 Y5
[gcode_macro _MOVE_TO_DOCK_SIDE]
# Location adjacent to dock
gcode:
G90 ; absolute coordinate system
G0 X34 Y4 z15 ; move to X34 Y5 z15
[gcode_macro _MOVE_OUT_OF_DOCK]
# Location adjacent to dock for exit Y+40
gcode:
G90 ; absolute coordinate system
G0 X5 Y72 z15 ; move out of dock
[gcode_macro _MOVE_TO_DOCK_CORNER]
# Location at corner of dock. This gives a safe place for the extruder to go. Use this to avoid extruder running into the dock if starting around x=0
gcode:
G90 ; absolute coordinate system
G0 X34 Y72 z15 ; move to X34 Y72 z15
[gcode_macro _MOVE_TO_CENTER]
# Location at center of the bed
gcode:
M118 Moving to probe position
G90 ; absolute coordinate system
G0 X291 Y270 z15 F8000 ; move to center