PMAC V3: axis status 5,6 not a failure
The old implementation assumes that the axis staying in state 5,6 for too much time a implies a failure. This is no longer the case.
This commit is contained in:
@ -484,33 +484,32 @@ asynStatus pmacAxis::getAxisStatus(bool *moving) {
|
|||||||
/*
|
/*
|
||||||
code to test against too long status 5 or 6
|
code to test against too long status 5 or 6
|
||||||
*/
|
*/
|
||||||
if (axStat == 5 || axStat == 6) {
|
// if (axStat == 5 || axStat == 6) {
|
||||||
if (status6Time == 0) {
|
// if (status6Time == 0) {
|
||||||
status6Time = time(NULL);
|
// status6Time = time(NULL);
|
||||||
statusPos = position;
|
// statusPos = position;
|
||||||
} else {
|
// } else {
|
||||||
if (time(NULL) > status6Time + 60) {
|
// if (time(NULL) > status6Time + 60) {
|
||||||
/* trigger error only when not moving */
|
///* trigger error only when not moving */
|
||||||
if (abs(position - statusPos) < .1) {
|
// if (abs(position - statusPos) < .1) {
|
||||||
done = 1;
|
// done = 1;
|
||||||
*moving = false;
|
//*moving = false;
|
||||||
setIntegerParam(pC_->motorStatusMoving_, false);
|
// setIntegerParam(pC_->motorStatusMoving_, false);
|
||||||
setIntegerParam(pC_->motorStatusDone_, true);
|
// setIntegerParam(pC_->motorStatusDone_, true);
|
||||||
setIntegerParam(pC_->motorStatusProblem_, true);
|
// setIntegerParam(pC_->motorStatusProblem_, true);
|
||||||
errlogPrintf(
|
// errlogPrintf("Axis %d stayed in 5,6 for more then 60 seconds BROKEN\n",
|
||||||
"Axis %d stayed in 5,6 for more then 60 seconds BROKEN\n",
|
// axisNo_);
|
||||||
axisNo_);
|
// updateMsgTxtFromDriver("Axis stayed in 5,6 for more then 60 seconds:
|
||||||
updateMsgTxtFromDriver(
|
// BROKEN");
|
||||||
"Axis stayed in 5,6 for more then 60 seconds: BROKEN");
|
// status6Time = 0;
|
||||||
status6Time = 0;
|
// return asynSuccess;
|
||||||
return asynSuccess;
|
// } else {
|
||||||
} else {
|
// status6Time = time(NULL);
|
||||||
status6Time = time(NULL);
|
// statusPos = position;
|
||||||
statusPos = position;
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
if (!done) {
|
if (!done) {
|
||||||
*moving = true;
|
*moving = true;
|
||||||
|
Reference in New Issue
Block a user