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:
@ -886,6 +886,13 @@ asynStatus turboPmacAxis::doReset() {
|
|||||||
// if we're currently inside it.
|
// if we're currently inside it.
|
||||||
pTurboPmacA_->waitForHandshake = false;
|
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;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user