EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: motor record DLY and STOP problem
From: Torsten Bögershausen <[email protected]>
To: "Pearson, Matthew R." <[email protected]>, "[email protected] list" <[email protected]>
Date: Mon, 16 Nov 2015 09:54:27 +0100


On 11/11/15 16:18, Pearson, Matthew R. wrote:

Hi,

There seems to be a problem with issuing a motor record STOP while we are waiting for a DLY settling time to expire. I can lock up the motor record if I issue a STOP after MOVN has gone to zero and before DMOV goes to 1. This only seems to be a problem if there are no further updates from the driver (so we have already stopped moving). It’s easy to reproduce using a simulation driver.

Now I can reproduce it.
Are you using a model 3 driver ?

If yes, then one reason is, that the poll() updates are "filtered" here, and the motorRecord is not processed,
when the encoder/motor is not moving at all in the DLY phase:

asynStatus asynMotorAxis::callParamCallbacks()
{
  if (statusChanged_) {
    statusChanged_ = 0;
    pC_->doCallbacksGenericPointer((void *)&status_, pC_->motorStatus_, axisNo_);
  }
  return pC_->callParamCallbacks(axisNo_);
}
----------------------
A "first aid help" quickfix can look like this:
Expose the statusChanged_ (move it out from private to protected in asynMotorAxis.h)


diff --git a/motorApp/MotorSrc/asynMotorAxis.h b/motorApp/MotorSrc/asynMotorAxis.h
index 4b22e85..1342b20 100644
--- a/motorApp/MotorSrc/asynMotorAxis.h
+++ b/motorApp/MotorSrc/asynMotorAxis.h
@@ -63,10 +63,10 @@ class epicsShareFunc asynMotorAxis {
double *profileReadbacks_; /**< Array of readback positions for profile moves */ double *profileFollowingErrors_; /**< Array of following errors for profile moves */
   int referencingMode_;
+  int statusChanged_;

   private:
   MotorStatus status_;
-  int statusChanged_;
   int referencingModeMove_;

   friend class asynMotorController;


-----------------
The change the driver to set statusChanged_ = 1 in the poll() function:
+  statusChanged_ = 1;


----------------------
This will make the motorRecord to be processed and get out of the DLY phase.

A better handling may be to have a flag that does not filter the callbacks,
whenever the motor record is used with a model 3 driver.

asynStatus asynMotorAxis::callParamCallbacks()
{
  if (statusChanged_ || isMotorRecordnowFilterButAlwaysProcess_) {
    statusChanged_ = 0;
    pC_->doCallbacksGenericPointer((void *)&status_, pC_->motorStatus_, axisNo_);
  }
  return pC_->callParamCallbacks(axisNo_);
}

Any thoughts ?

Replies:
RE: motor record DLY and STOP problem Mark Rivers
References:
motor record DLY and STOP problem Pearson, Matthew R.

Navigate by Date:
Prev: Re: Alternatives to softGlue? (re-configurable TTL I/O line logic controllable from EPICS) Andrew Gomella
Next: Re: CSS migration and problem with linking container widget Maurizio Montis
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: motor record DLY and STOP problem Pearson, Matthew R.
Next: RE: motor record DLY and STOP problem Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·