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
<2015>
2016
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
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|