From 1e8a6495b81c8aa3c567a37c2368ccdae665b07a Mon Sep 17 00:00:00 2001 From: smathis Date: Tue, 1 Jul 2025 13:11:06 +0200 Subject: [PATCH] Disable the axis on reset, if it is not moving Resetting the axis now also disables it, if it is not moving. --- src/turboPmacAxis.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/turboPmacAxis.cpp b/src/turboPmacAxis.cpp index 704e95b..4dd1219 100644 --- a/src/turboPmacAxis.cpp +++ b/src/turboPmacAxis.cpp @@ -886,6 +886,13 @@ asynStatus turboPmacAxis::doReset() { // if we're currently inside it. pTurboPmacA_->waitForHandshake = false; + // Disable the axis, if it is not in a moving state + int axStat = pTurboPmacA_->axisStatus; + if (axStat == 0 || axStat == -6) { + snprintf(command, sizeof(command), "M%2.2d14=0", axisNo_); + status = pC_->writeRead(axisNo_, command, response, 0); + } + return status; }