diff --git a/site_ansto/motor_dmc2280.c b/site_ansto/motor_dmc2280.c index 2d787162..042d045f 100644 --- a/site_ansto/motor_dmc2280.c +++ b/site_ansto/motor_dmc2280.c @@ -615,10 +615,10 @@ static void DMC2280Error(void *pData, int *iCode, char *error, int errLen){ strncpy(error,"Begin not possible due to limit switch",(size_t)errLen); break; case RVRSLIM: - strncpy(error,"Crashed into reverse limit switch",(size_t)errLen); + strncpy(error,"Crashed into limit switch",(size_t)errLen); break; case FWDLIM: - strncpy(error,"Crashed into forward limit switch",(size_t)errLen); + strncpy(error,"Crashed into limit switch",(size_t)errLen); break; case POSFAULT: strncpy(error,"Positioning fault detected",(size_t)errLen); @@ -677,7 +677,9 @@ static int DMC2280Fix(void *pData, int iCode,/*@unused@*/ float fValue){ /** \brief Emergency halt. Implements the Halt * method in the MotorDriver interface. * - * Uses maximum deceleration + * Cannot set maximum deceleration because the DC command + * is not valid for absolute (ie PA) moves. See DC description + * in DMC-2xxx command ref (ie manc2xxx.pdf) * \param *pData provides access to a motor's data * * XXX Does abstract motor use the return values? @@ -688,20 +690,12 @@ static int DMC2280Halt(void *pData){ self = (pDMC2280Driv)pData; assert(self != NULL); - /* Set maximum deceleration to stop motor */ - snprintf(cmd, CMDLEN, "DC%c", motDecel(self, self->maxDecel)); - if (FAILURE == DMC2280Send(self, cmd)) - return HWFault; /* Stop motor */ snprintf(cmd, CMDLEN, "ST%c", self->axisLabel); if (FAILURE == DMC2280Send(self, cmd)) - return HWFault; - /* Restore deceleration */ - snprintf(cmd, CMDLEN, "DC%c", motDecel(self, self->decel)); - if (FAILURE == DMC2280Send(self, cmd)) - return HWFault; - - return 1; + return HWFault; + else + return 1; } /** \brief Fetches the value of the named parameter,