-
Notifications
You must be signed in to change notification settings - Fork 1
/
KNOBPROBE.cfg
137 lines (128 loc) · 3.95 KB
/
KNOBPROBE.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
# Knobprobe is configured as any regular probe.
[knobprobe]
pin: ^PG12
deactivate_on_each_sample: False
z_offset: 0
speed: 4.0
samples: 3
sample_retract_dist: 2.0
lift_speed: 10
samples_tolerance: 0.02
samples_tolerance_retries: 5
# Here are some sample macros.
[gcode_macro KNOBPROBE_PREPARE]
gcode:
# To home Z, we first must home X and Y.
{% if printer['gcode_macro HOMING_STATUS'].y != 1 %}
G28 Y
{% endif %}
{% if printer['gcode_macro HOMING_STATUS'].x != 1 %}
G28 X
{% endif %}
RESPOND PREFIX="info" MSG="Moving over KnobProbe"
T49 # Load Z-switch tool. Willdo Z+10 first
G90
G0 X250 Y250 Z100 F34000
[gcode_macro KNOBPROBE_HOME]
gcode:
# To home Z, we first must home X and Y.
{% if printer['gcode_macro HOMING_STATUS'].y != 1 %}
G28 Y
{% endif %}
{% if printer['gcode_macro HOMING_STATUS'].x != 1 %}
G28 X
{% endif %}
RESPOND PREFIX="info" MSG="Homing Z on KnobProbe"
SET_GCODE_VARIABLE MACRO=HOMING_STATUS VARIABLE=z VALUE=3
# SET_KINEMATIC_POSITION Z=0
T49 # Load Z-switch tool. Willdo Z+10 first
G90
G0 X250 Y250 F34000
G990028 Z0
G0 Z10
SET_GCODE_VARIABLE MACRO=HOMING_STATUS VARIABLE=z VALUE=1
[gcode_macro KNOBPROBE_T0]
gcode:
# To probe, we first must home X, Y and Z.
{% if printer['gcode_macro HOMING_STATUS'].y != 1 %}
RESPOND PREFIX="error" MSG="Y not homed"
{% elif printer['gcode_macro HOMING_STATUS'].x != 1 %}
RESPOND PREFIX="error" MSG="X not homed"
{% elif printer['gcode_macro HOMING_STATUS'].z != 1 %}
RESPOND PREFIX="error" MSG="Z not homed"
{% else %}
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=0
RESPOND PREFIX="info" MSG="Probing T0 on KnobProbe"
G90
G0 Z10
T0
# TOOL_PICKUP T=0 WIPE=0 # Load T0
SET_GCODE_OFFSET Z=0
G0 X250 Y250 F34000
KNOBPROBE
G0 Z10
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=1
{% endif %}
[gcode_macro KNOBPROBE_T9]
gcode:
# To probe, we first must home X, Y and Z.
{% if printer['gcode_macro HOMING_STATUS'].y != 1 %}
RESPOND PREFIX="error" MSG="Y not homed"
{% elif printer['gcode_macro HOMING_STATUS'].x != 1 %}
RESPOND PREFIX="error" MSG="X not homed"
{% elif printer['gcode_macro HOMING_STATUS'].z != 1 %}
RESPOND PREFIX="error" MSG="Z not homed"
{% else %}
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=0
RESPOND PREFIX="info" MSG="Probing T9 on KnobProbe"
G90
G0 Z10
T9
# TOOL_PICKUP T=9 WIPE=0 # Load T9
SET_GCODE_OFFSET Z=0
G0 X250 Y250 F34000
KNOBPROBE
G0 Z10
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=1
{% endif %}
[gcode_macro KNOBPROBE_T10]
gcode:
# To probe, we first must home X, Y and Z.
{% if printer['gcode_macro HOMING_STATUS'].y != 1 %}
RESPOND PREFIX="error" MSG="Y not homed"
{% elif printer['gcode_macro HOMING_STATUS'].x != 1 %}
RESPOND PREFIX="error" MSG="X not homed"
{% elif printer['gcode_macro HOMING_STATUS'].z != 1 %}
RESPOND PREFIX="error" MSG="Z not homed"
{% else %}
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=0
RESPOND PREFIX="info" MSG="Probing T10 on KnobProbe"
G90
G0 Z10
T10
SET_GCODE_OFFSET Z=0
G0 X250 Y250 F34000
KNOBPROBE
G0 Z10
# SET_GCODE_VARIABLE MACRO=LOCK_INIT VARIABLE=purge_on_toolchange VALUE=1
{% endif %}
[gcode_macro RUN_QUERY_KNOBPROBE]
#rename_existing: QUERY_KNOBPROBE01
gcode:
QUERY_KNOBPROBE
[gcode_macro RUN_PROBE_KNOBACCURACY]
#rename_existing: PROBE_KNOBACCURACY01
gcode:
# {% if printer["gcode_macro LOCK_INIT"].tool_current|int >= 0 %}
PROBE_KNOBACCURACY
# {% else %}
# RESPOND PREFIX="error" MSG="T not mounted"
# {% endif %}
[gcode_macro RUN_PROBE_ACCURACY]
#rename_existing: PROBE_ACCURACY01
gcode:
# {% if printer["gcode_macro LOCK_INIT"].tool_current|int ==49 %}
PROBE_ACCURACY
# {% else %}
# RESPOND PREFIX="error" MSG="T49 not mounted"
# {% endif %}