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
|