-
Notifications
You must be signed in to change notification settings - Fork 0
/
probing.cfg
205 lines (189 loc) · 6.1 KB
/
probing.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#####################################################################
# Probe
#####################################################################
[probe]
pin: PG12
x_offset: 0
y_offset: 18.0
z_offset: 2.5 #2.5
speed: 15.0
lift_speed: 8.0
samples: 3
samples_result: median
sample_retract_dist: 1
samples_tolerance: 0.0075 #0.007
samples_tolerance_retries: 10
#####################################################################
# Gantry Adjustment Routines
#####################################################################
#[quad_gantry_level]
## Gantry Corners for 300mm Build
#gantry_corners:
# -60,-10
# 410,420
# Probe points
#points:
# 50,25
# 50,275
# 300,275
# 300,25
#speed: 300
#horizontal_move_z: 10 #5
#retries: 5
#retry_tolerance: 0.0075
#max_adjust: 10
#####################################################################
# Z Calibration
#####################################################################
[z_calibration]
# position on z-endstop for nozzle probing
nozzle_xy_position: 170,300
# position on z-endstop for switch probing
switch_xy_position: 163,280
# position on bed for print surface probing
# !!! this must be the relative reference point of the mesh, if using one !!!
bed_xy_position: 150,150
switch_offset: 0.2950 # 0.670 ; smaller is more away from bed!
max_deviation: 1.0000
speed: 300
clearance: 7 #5
samples: 3
samples_tolerance: 0.0065 #0.006
#samples_tolerance_retries: 10
#samples_result: median
#position_min: -5
lift_speed: 8 #8
probing_speed: 10 #10
probing_second_speed: 6
probing_retract_dist: 4
probing_first_fast: false
#####################################################################
# Macros
#####################################################################
## customize QUAD GANTRY LEVEL gcode
[gcode_macro Z_TILT_ADJUST]
rename_existing: BASE_Z_TILT_ADJUST
gcode:
M117 Z Tilt..
_CG28 RESET_SETTINGS=false
# reduce accel current
#_SET_ACC VAL=HOME
#_SET_Z_CURRENT VAL=HOME
SECURE_ATTACH_PROBE
BASE_Z_TILT_ADJUST
# ability to disable z calibration - it's done later in PRINT_START
{% if params.CALIBRATE|default('true') == 'true' %}
CALIBRATE_Z RESET_SETTINGS=false
{% else %}
SECURE_DOCK_PROBE
{% endif %}
# reset accel current
{% if params.RESET_SETTINGS|default('true') == 'true' %}
#_SET_Z_CURRENT
#_SET_ACC
{% endif %}
M117
## customize CALIBRATE Z gcode
[gcode_macro CALIBRATE_Z]
rename_existing: BASE_CALIBRATE_Z
gcode:
{% set bed_position = params.BED_POSITION|default('None') %}
M117 Z-Calibration..
SECURE_ATTACH_PROBE # a macro for fetching the probe first
{% if bed_position != 'None' %}
BASE_CALIBRATE_Z BED_POSITION={bed_position}
{% else %}
BASE_CALIBRATE_Z
{% endif %}
SECURE_DOCK_PROBE # and parking it afterwards (or DOCK_PROBE in klicky macros)
M117
# attaching the probe if not already attached
[gcode_macro SECURE_ATTACH_PROBE]
gcode:
QUERY_PROBE
_PROBE_ACTION action=attach
_CHECK_PROBE action=check_attach
# docking the probe if not already docked
[gcode_macro SECURE_DOCK_PROBE]
gcode:
QUERY_PROBE
_PROBE_ACTION action=dock
_CHECK_PROBE action=check_dock
[gcode_macro _CHECK_PROBE]
variable_probe_state: 0
gcode:
QUERY_PROBE
_PROBE_ACTION action={ ACTION }
[gcode_macro _PROBE_ACTION]
gcode:
{% set state = not printer.probe.last_query %}
SET_GCODE_VARIABLE MACRO=_CHECK_PROBE VARIABLE=probe_state VALUE={ state }
# attach/dock probe
{% if not state and params.ACTION == 'attach' %}
_ATTACH_PROBE
{% endif %}
{% if state and params.ACTION == 'dock' %}
_DOCK_PROBE
{% endif %}
# check if probe fails to attach/detach
{% if state and params.ACTION == 'check_dock' %}
{ action_raise_error("Probe dock failed!") }
{% endif %}
{% if not state and params.ACTION == 'check_attach' %}
{ action_raise_error("Probe attach failed!") }
{% endif %}
# this attaching from above is more silent but would
# be dangerous if the probe is already attached!
#[gcode_macro _ATTACH_PROBE]
#gcode:
# SAVE_GCODE_STATE NAME=_ATTACH_PROBE
# SET_GCODE_OFFSET Z=0.0 ; reset offset - will be restored
# G90 ; absolute positioning
# G0 X252.5 Y300 Z10 F12000 ; move to mag-probe
# G0 Z0.0 F540 ; move down to mag-probe
# G0 Y285 F6000 ; move out
# G0 Z10 F540 ; move up
# RESTORE_GCODE_STATE NAME=_ATTACH_PROBE
[gcode_macro _ATTACH_PROBE]
gcode:
SAVE_GCODE_STATE NAME=_ATTACH_PROBE
SET_GCODE_OFFSET Z=0.0 ; reset offset - will be restored
G90 ; absolute positioning
G0 X50 Y284 Z10 F8000 ; move to mag-probe
# G0 Z1.0 F540 ; move down to mag-probe
G0 Y300 F6000 ; move in
G0 Y270 F6000 ; move out
# G0 Z10 F540 ; move up
RESTORE_GCODE_STATE NAME=_ATTACH_PROBE
[gcode_macro _DOCK_PROBE]
gcode:
SAVE_GCODE_STATE NAME=_DOCK_PROBE
SET_GCODE_OFFSET Z=0.0 ; reset offset - will be restored
G90 ; absolute positioning
G0 X50 Y284 Z10 F8000 ; move to mag-probe
# G0 Z1.0 F540 ; move down to mag-probe
G0 Y300 F6000 ; move in
G0 X80 F6000 ; move in
# G0 Z15 F540 ; move up
RESTORE_GCODE_STATE NAME=_DOCK_PROBE
#[gcode_macro BED_MESH_CALIBRATE]
#rename_existing: _BED_MESH_CALIBRATE
#gcode:
# SECURE_ATTACH_PROBE
# _BED_MESH_CALIBRATE {% for p in params
# %}{'%s=%s' % (p, params[p])}{%
# endfor %}
# SECURE_DOCK_PROBE
[gcode_macro PROBE_ACCURACY]
rename_existing: _PROBE_ACCURACY
gcode:
#store current nozzle location
#SAVE_GCODE_STATE NAME=original_nozzle_location
SECURE_ATTACH_PROBE
PARKCENTER Z={printer.configfile.settings.z_tilt_adjust.horizontal_move_z}
_PROBE_ACCURACY {% for p in params
%}{'%s=%s' % (p, params[p])}{%
endfor %}
SECURE_DOCK_PROBE
#restore current nozzle location
#RESTORE_GCODE_STATE NAME=original_nozzle_location MOVE=1