Added axis reinitialization after node reset
When resetting the node, values within the controller may change, which need to be reread by the init function.
This commit is contained in:
@@ -814,8 +814,9 @@ asynStatus masterMacsAxis::doReset() {
|
||||
setAxisParamChecked(this, motorStatusProblem, true);
|
||||
}
|
||||
|
||||
// Reset any errors in the controller
|
||||
status = pC_->write(axisNo_, 17, "");
|
||||
// Reset any errors in the controller. Since the node reset results in a
|
||||
// power cycle, we use the corresponding timeout.
|
||||
status = pC_->write(axisNo_, 17, "", PowerCycleTimeout);
|
||||
if (status != asynSuccess) {
|
||||
setAxisParamChecked(this, motorStatusProblem, true);
|
||||
}
|
||||
@@ -823,7 +824,13 @@ asynStatus masterMacsAxis::doReset() {
|
||||
// Move out of the handshake wait loop, if we're currently inside it.
|
||||
pMasterMacsA_->waitForHandshake = false;
|
||||
|
||||
return status;
|
||||
// Reinitialize the axis
|
||||
status = masterMacsAxis::init();
|
||||
if (status != asynSuccess) {
|
||||
return status;
|
||||
}
|
||||
bool moving = false;
|
||||
return forcedPoll(&moving);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user