From 339da2e9ff4d02a78838460d57881d8be283383d Mon Sep 17 00:00:00 2001 From: brambilla_m Date: Thu, 21 Jul 2022 13:37:32 +0200 Subject: [PATCH] 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. --- sinqEPICSApp/src/pmacAxis.cpp | 53 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/sinqEPICSApp/src/pmacAxis.cpp b/sinqEPICSApp/src/pmacAxis.cpp index b2505b9..0c29be8 100644 --- a/sinqEPICSApp/src/pmacAxis.cpp +++ b/sinqEPICSApp/src/pmacAxis.cpp @@ -484,33 +484,32 @@ asynStatus pmacAxis::getAxisStatus(bool *moving) { /* code to test against too long status 5 or 6 */ - if (axStat == 5 || axStat == 6) { - if (status6Time == 0) { - status6Time = time(NULL); - statusPos = position; - } else { - if (time(NULL) > status6Time + 60) { - /* trigger error only when not moving */ - if (abs(position - statusPos) < .1) { - done = 1; - *moving = false; - setIntegerParam(pC_->motorStatusMoving_, false); - setIntegerParam(pC_->motorStatusDone_, true); - setIntegerParam(pC_->motorStatusProblem_, true); - errlogPrintf( - "Axis %d stayed in 5,6 for more then 60 seconds BROKEN\n", - axisNo_); - updateMsgTxtFromDriver( - "Axis stayed in 5,6 for more then 60 seconds: BROKEN"); - status6Time = 0; - return asynSuccess; - } else { - status6Time = time(NULL); - statusPos = position; - } - } - } - } + // if (axStat == 5 || axStat == 6) { + // if (status6Time == 0) { + // status6Time = time(NULL); + // statusPos = position; + // } else { + // if (time(NULL) > status6Time + 60) { + ///* trigger error only when not moving */ + // if (abs(position - statusPos) < .1) { + // done = 1; + //*moving = false; + // setIntegerParam(pC_->motorStatusMoving_, false); + // setIntegerParam(pC_->motorStatusDone_, true); + // setIntegerParam(pC_->motorStatusProblem_, true); + // errlogPrintf("Axis %d stayed in 5,6 for more then 60 seconds BROKEN\n", + // axisNo_); + // updateMsgTxtFromDriver("Axis stayed in 5,6 for more then 60 seconds: + // BROKEN"); + // status6Time = 0; + // return asynSuccess; + // } else { + // status6Time = time(NULL); + // statusPos = position; + // } + // } + // } + //} if (!done) { *moving = true;