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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count |
From: | "Pearson, Matthew via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Chiang, Liang-Chih [江良志] <chiang.lc at nsrrc.org.tw>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Mon, 27 Mar 2023 14:22:44 +0000 |
Hi, Usually it’s best to try to keep MRES and ERES the same sign, which is overall less confusing. However, if you can’t do that, setting ERES negative
is the correct solution, assuming you can’t reinstall the encoder so it’s the correct direction. Or, the motor direction could be changed so that it matches the encoder (which may also mean re-wiring the limits).
However, if you can’t fix the hardware, you have the encoder stall issue because the driver expect the encoder to be moving in the same direction
as the motor. This check can be disabled either by disabling the encoder in the motor record (setting UEIP=No), or by setting the encoder tolerance to be a very high number. The encoder tolternace is a feature of the Galil driver, these two records: $(P)$(M)_ENC_TOLERANCE_SP $(P)$(M)_ENC_TOLERANCE If you set the tolerance to a large value (say 1,000,000) it will effectively disable the direction check.
Cheers, Matt From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Chiang, Liang-Chih [???] via Tech-talk Hello, EPICS mates, I use Galil DCM 4080 motor controller and Renishaw absolute encoder. When the increasing direction of motor pulses is opposite of that of encoder count, which is, encoder count decreases while motor pulse increases, my solution is to set motor record's ERES to be negative. However, this solution will cause "Encoder Stall" problem. The source of this problem cames from GalilAxis.cpp of Galil support module, in the following function, encDirOk_ will be set to false because of opposite direction: void GalilAxis::setStatus(bool *moving) ... //Encoder direction ok flag encDirOk_ = (encoder_direction == direction_) ? true : false; ... then in the following function, because of encDirOk_ is false, after a period of time, it will be regards as "Encoder Stall" and stop motor. //Called by poll without lock
//When encoder problem detected //May stop motor via pollServices thread void GalilAxis::checkEncoder(void) ... if (((ueip_ || ctrlUseMain_) && !done_ && !deferredMove_ && (!encoderMove_ ||
!encDirOk_))) ... My questions are: 1. Is my solution "negative ERES"
ok? 2.What would be a good fix to Galil support module? Just remove checking of encDirOk_? |