forked from zellneralex/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprobe_qgl.cfg
141 lines (134 loc) · 4.56 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
#####################################################################
# 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]
## Inductive Probe / Mag Probe
## This probe is not used for Z height
# pin: ^!octopus:PC5
# pin: !octopus:PG15
pin: octopus:PG15
# x_offset: 0
# y_offset: 25.0
# z_offset: 0
# speed: 10.0
# samples: 3
# samples_result: median
# sample_retract_dist: 6.0
# samples_tolerance: 0.009
# samples_tolerance_retries: 9
x_offset: 0
y_offset: 19.75
z_offset: 3.200
speed: 7.5
lift_speed: 30.0
samples: 5
samples_result: median
#sample_retract_dist: 6
sample_retract_dist: 0.8
#sample_retract_dist: 1.2
samples_tolerance: 0.005
#samples_tolerance: 0.009
samples_tolerance_retries: 10
#####################################################################
# Disable Heater while probing
#####################################################################
#[homing_heaters]
#steppers: stepper_z, stepper_z1, stepper_z2, stepper_z3
#heaters: extruder
#####################################################################
# Gantry Adjustment Routines
#####################################################################
[quad_gantry_level]
## Min & Max gantry corners - measure from nozzle to respective belt positions
gantry_corners:
-76,-10
344, 363
## Probe points; this are nozzel positions we need to substract the probe offset
points:
70,35
70,165
210,165
210,35
#speed: 100
speed: 200
#horizontal_move_z: 10 ; MagProbe 20, Vinda or Omron 5
horizontal_move_z: 20 ; MagProbe 20, Vinda or Omron 5
retries: 10
#retry_tolerance: 0.005
retry_tolerance: 0.0075
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:
{% 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
[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 %}