Skip to content

Commit a42d628

Browse files
Merge pull request #770 from CptanPanic/touch-zero
Added option to setting plunge depth of Zaxis touch probe.
2 parents 405c576 + 95b12a5 commit a42d628

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Settings/maslowSettings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@
173173
],
174174
"Advanced Settings":
175175
[
176+
{
177+
"type": "string",
178+
"title": "Max touch Z-axis plunge",
179+
"desc": "Max depth the z axis should plunge in order to find the touch probe",
180+
"key": "maxTouchProbePlungeDistance",
181+
"default": 0.0,
182+
},
176183
{
177184
"type": "string",
178185
"title": "Encoder Steps per Revolution",

UIElements/zAxisPopupContent.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ def touchZero(self):
139139
Probe for Zero Z
140140
'''
141141
self.setMachineUnits()
142+
plungeDepth = self.data.config.get('Advanced Settings', 'maxTouchProbePlungeDistance')
143+
142144
if self.data.units == "INCHES":
143-
self.data.gcode_queue.put("G38.2 Z-.2 F2") #Only go down 0.2 inches...
145+
self.data.gcode_queue.put("G20 G90 G38.2 Z-" + plungeDepth + " F1 G20 G90 M02")
144146
else:
145-
self.data.gcode_queue.put("G38.2 Z-5 F50") #Or 5mm.
147+
self.data.gcode_queue.put("G21 G90 G38.2 Z-" + plungeDepth + " F1 G21 G90 M02")
146148
self.resetMachineUnits()
147149

148150

groundcontrol.kv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@
643643
size_hint_y: 0.2
644644
text: "Touch Zero"
645645
on_release: root.touchZero()
646-
disabled: True
646+
disabled: False
647647
Button:
648648
text: "Lower"
649649
on_release: root.zIn()

0 commit comments

Comments
 (0)