Skip to content

Commit 2a7116b

Browse files
committed
qtvcp -versa/basic probe: fix path for inside probing
X probing finished in the latch return position rather then the X starting point. This meant that Y would probe too close to the X wall sometimes hitting the corner radius. Thanks to Rudy of the SA CNC club for report and fix.
1 parent aa71178 commit 2a7116b

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

lib/python/qtvcp/widgets/probe_routines.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,14 @@ def probe(self, name):
105105
else:
106106
return -1
107107
axis = name[0].upper()
108+
laxis = name[0].lower()
109+
110+
# save current position so we can return to it
111+
rtn = self.CALL_MDI_WAIT('#<{}>=#<_{}>'.format(laxis,laxis), self.timeout)
108112
# probe toward target
109113
s = """G91
110114
G38.2 {}{} F{}""".format(axis, travel, self.data_search_vel)
111-
rtn = self.CALL_MDI_WAIT(s, self.timeout)
115+
rtn = self.CALL_MDI_WAIT(s, self.timeout)
112116
if rtn != 1:
113117
return 'Probe {} failed: {}'.format(name, rtn)
114118
# retract
@@ -122,14 +126,14 @@ def probe(self, name):
122126
rtn = self.CALL_MDI_WAIT(s, self.timeout)
123127
if rtn != 1:
124128
return 'Probe {} failed: {}'.format(name, rtn)
125-
# retract
126-
s = "G1 {}{} F{}".format(axis, -latch, self.data_rapid_vel)
129+
# retract to original position
130+
s = "G90 G1 {}#<{}> F{}".format(axis, laxis, self.data_rapid_vel)
127131
rtn = self.CALL_MDI_WAIT(s, self.timeout)
128132
if rtn != 1:
129133
return 'Probe {} failed: {}'.format(name, rtn)
134+
# return all good
130135
return 1
131136

132-
133137
def CALL_MDI_LIST(self, codeList):
134138
for s in codeList:
135139
# call the gcode in MDI

0 commit comments

Comments
 (0)