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; }