Disable the axis on reset, if it is not moving

Resetting the axis now also disables it, if it is not moving.
This commit is contained in:
2025-07-01 13:11:06 +02:00
parent 6b91ab6d51
commit 1e8a6495b8

View File

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