Hi, Pearson, thanks for the response.
> assuming you can’t reinstall the encoder
In most situations, I can't.
> Or, the motor direction could be changed
Mostly I can't do that either.
> disabling the encoder in the motor record (setting UEIP=No)
I should not disable it. Otherwise it's useless to install the encoders.
> by setting the encoder tolerance to be a very high number.
> $(P)$(M)_ENC_TOLERANCE_SP
> $(P)$(M)_ENC_TOLERANCE
This feature is in a newer version of Galil support module than the one I use.
Currently as a temporary fix, I set Encode Stall Time record to be a larger value.
$(P)$(M)_ENC_TOLERANCE_SP
$(P)$(M)_ENC_TOLERANCE
Best regards.
LiangChih Chiang
NSRRC
Beamline Group
email:chiang.lc at nsrrc.org.tw
________________________________
寄件者: Pearson, Matthew <pearsonmr at ornl.gov>
寄件日期: 2023年3月27日 下午 10:22
收件者: Chiang, Liang-Chih [江良志] <chiang.lc at nsrrc.org.tw>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
主旨: RE: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count
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
Sent: Monday, March 27, 2023 4:58 AM
To: tech-talk at aps.anl.gov
Subject: [EXTERNAL] Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count
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<mailto:chiang.lc at nsrrc.org.tw>
- References:
- Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count Chiang, Liang-Chih [江良志] via Tech-talk
- 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: areadetector on windows, xml2 done, now Lightfield Freddie Akeroyd - STFC UKRI via Tech-talk
- Next:
SSEQ record does not "appear" to be demanding callback completion from an asynchronous record forward-linked to another asynchronous record Wang, Andrew 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
<2023>
2024
- Navigate by Thread:
- Prev:
RE: Encoder Stall happens when increasing direction of motor pulses is opposite of that of encoder count Pearson, Matthew via Tech-talk
- Next:
Error pyepics with odroid / libca.so cannot open shared object file. LE-DANIEL Erwann 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
<2023>
2024
|