Skip to content

Commit 67bdfbc

Browse files
committed
qtvcp -probe routines:fix spindle start on error or abort
If a user starts the spindle in MDI but stops it with a manual button, then an error or abort in the probe routines will start the spindle. related to using M70/M72 to reset modes after probing Setting M5 before recording with m70 is the workaround
1 parent ef17bb8 commit 67bdfbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/python/qtvcp/widgets/probe_subprog.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,18 @@ def collect_status(self):
242242

243243
# need to be in the right mode - entries are in machine units
244244
def prechecks(self):
245+
# This is a work around. If a user sets the spindle running in MDI
246+
# but turn it off with a manual button, then when M72 will turn the
247+
# spindle back on! So we explicitly set M5 here.
248+
ACTION.CALL_MDI('M5')
249+
# record current G,S,M codes
245250
ACTION.CALL_MDI('M70')
251+
252+
# set proper mode based on what machine is based
246253
if INFO.MACHINE_IS_METRIC and STATUS.is_metric_mode():
247254
return None
248255
if not INFO.MACHINE_IS_METRIC and not STATUS.is_metric_mode():
249256
return None
250-
# record motion modes
251257
if INFO.MACHINE_IS_METRIC:
252258
ACTION.CALL_MDI('g21')
253259
else:

0 commit comments

Comments
 (0)