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  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count
From: Chiang, Liang-Chih [江良志] via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 27 Mar 2023 08:58:06 +0000
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_?

Best regards.



LiangChih Chiang

NSRRC

Beamline Group

email:chiang.lc at nsrrc.org.tw 


Replies:
RE: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count Pearson, Matthew via Tech-talk

Navigate by Date:
Prev: Re: Doubts about libpcre in compilation NICOLE Remi via Tech-talk
Next: Re: areadetector on windows, xml2 done, now Lightfield William Kirstaedter via Tech-talk
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  <20232024 
Navigate by Thread:
Prev: Re: GitHub's new rsa ssh host-key Michael Davidsaver via Tech-talk
Next: RE: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count Pearson, Matthew via Tech-talk
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  <20232024 
ANJ, 27 Mar 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·