forked from wile-e1/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprobe_qgl.cfg
144 lines (139 loc) · 4.48 KB
/
probe_qgl.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
#####################################################################
# Probe
#####################################################################
############### Different Probe Settings ###############
## Omron:
## speed: 10.0
## lift_speed: 30.0
## samples: 9
## samples_result: median
## sample_retract_dist: 0.5
## samples_tolerance: 0.006
## samples_tolerance_retries: 10
## y_offset: 25.00
########################################################
## Super Pinda:
## speed: 7.5
## lift_speed: 30.0
## samples: 6
## samples_result: median
## sample_retract_dist: 0.8
## samples_tolerance: 0.005
## samples_tolerance_retries: 10
## y_offset: 25.00
########################################################
## MagProbe Klicky
## speed: 7.5
## lift_speed: 30.0
## sample: 5
## samples_result: median
## sample_retract_dist: 0.8
## samples_tolerance: 0.005
## samples_tolerance_retries: 10
## y_offset: 19.75
## z_offset: 6.42 #not needed since a Endstop is used
############### Different Probe Settings ##############
[probe]
pin: PG15#PB13 For Klicky
#pin: ~PB7#PB13 For Inductive
x_offset: 0
y_offset: 0#16.95 #18.75
z_offset: 8.5
#z_offset: 0
# speed: 3.5 #2.5
speed: 6 #2.5
lift_speed: 15
samples: 3
samples_result: median
sample_retract_dist: 2.6
samples_tolerance: 0.01
samples_tolerance_retries: 4
#####################################################################
# Disable Heater while probing
#####################################################################
#[homing_heaters]
#steppers: stepper_z, stepper_z1, stepper_z2, stepper_z3
#heaters: extruder
#####################################################################
# Gantry Adjustment Routines
#####################################################################
[quad_gantry_level]
gantry_corners:
-60,-10
360,370
points:
40,40
40,250
260,250
260,40
# 85,85
# 85,215
# 215,215
# 215,85
speed: 350
# horizontal_move_z: 15#12 #9
horizontal_move_z: 14
retries: 4
retry_tolerance: 0.01
max_adjust: 8
# [quad_gantry_level]
# ## Min & Max gantry corners - measure from nozzle to respective belt positions
# gantry_corners:
# -56,-1
# 406,420
# ## Probe points# this are nozzel positions we need to substract the probe offset
# points:
# 100,50
# 100,250
# 250,250
# 250,50
# speed: 200
# horizontal_move_z: 20 # MagProbe 20, Vinda or Omron 5
# retries: 10
# retry_tolerance: 0.005
# max_adjust: 15
#####################################################################
# Macros
#####################################################################
[gcode_macro QUAD_GANTRY_LEVEL]
description: Conform a moving, twistable gantry to the shape of a stationary bed
rename_existing: QUAD_GANTRY_LEVEL_BASE
gcode:
status_leveling
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set move_z = [user.z_hop, printer.toolhead.position.z]|max %} # calc movement high
_SET_Z_CURRENT VAL=HOME
{% if "xyz" not in printer.toolhead.homed_axes %} G28 {% endif %}
{% if user.hw.mag_probe.ena %}
G90
G0 Z{move_z} F{user.speed.z_hop} # move head up to insure Probe is not triggered in error case
ATTACH_PROBE
{% endif %}
QUAD_GANTRY_LEVEL_BASE {rawparams}
{% if user.hw.mag_probe.ena %} DETACH_PROBE {% endif %}
{% if params.HOME|default('true')|lower == 'true' %} G28 Z {% endif %}
_SET_Z_CURRENT
{% if params.PARK|default('true')|lower == 'true' %}
G90
G0 X{user.park.bed.x} Y{user.park.bed.y} Z{user.park.bed.z} F{user.speed.travel}
{% endif %}
{% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} # set back to relative
status_ready
[gcode_macro CHECK_QGL]
description: Run after QUAD_GANTRY_LEVEL to insure it passes
gcode:
{% set user = printer['gcode_macro _USER_VARIABLE'] %}
{% set probe_state = printer['gcode_macro _MAG_PROBE'].state|default('unknown')|lower %} # get probe state
{% set probe_ok = False if user.hw.mag_probe.ena and (probe_state == 'error' or probe_state == 'unknown')
else True %}
{% if not printer.quad_gantry_level.applied or not probe_ok %} # check QGL and probe status
{action_respond_info("QGL CHECK: Fail therefore cancel the print")}
PAUSE_BASE
G90
G0 Z{user.z_hop} F{user.speed.z_hop} # move nozzle to z high first
{% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} # set back to relative
{% if user.hw.mag_probe.ena %} DETACH_PROBE {% endif %}
CANCEL_PRINT PARK=1 ERROR=1
{% else %}
{action_respond_info("QGL CHECK: Pass")}
{% endif %}