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> | 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> |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Galil controller with incremental encoder question |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "padmoz at tpg.com.au" <padmoz at tpg.com.au> |
Date: | Fri, 22 Mar 2024 01:51:34 +0000 |
Hi Mark, I have solved the problem. It is related to the problem in this tech-talk thread: https://epics.anl.gov/tech-talk/2024/msg00121.php My template file did not define ERES, only MRES. Thus, encoder ratio was infinite during iocInit, which resulted in setEncoderPosition not being called when the motor position was set. This problem is hard to spot because ERES is later
set to MRES in iocInit, so it appears OK. Based on my previous problem, devMotorAsyn.cpp has been fixed to avoid this issue. When I updated my motor version to master with that fix the problem is gone. I could have also fixed it by adding ERES to the template file. Sorry for the bother. Thanks, Mark From: Mark Rivers <rivers at cars.uchicago.edu> Hi Mark, Thanks for the reply, sorry it's taken awhile to get back to this. I am working on axis C on a Galil 4183 with the D3140 servo amplifier unit installed. I have attached a screen shot of the motorx_all screen (Galil.png).
I have also attached a screen shot of the galil_motor_extras.adl for this axis (Galil_extras.png). The axis is configured as Servo with Reverse Quadrature encoder. (The problem happens with Normal Quadrature as well). In the motorx_all screen I have set Use Encoder=Yes (UEIP field). I put the axis in Set mode and type 0 into the VAL field. VAL, DVAL, and RVAL all set set
to 0 as expected. However, RRBV, RBV, and DRBV do not change, they are the same encoder readback as before I set the position.
I have done that.
DEC=? returns 0, but DPC=? returns -4000, so the encoder value was not written to the hardware. Here are the PVs you asked about: (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MTRTYPE_CMD 13BMC:Galil7:m73_MTRTYPE_CMD Servo (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MTRTYPE_STATUS 13BMC:Galil7:m73_MTRTYPE_STATUS Servo (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MENCTYPE_CMD 13BMC:Galil7:m73_MENCTYPE_CMD Reverse Quadrature (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MENCTYPE_STATUS 13BMC:Galil7:m73_MENCTYPE_STATUS Reverse Quadrature (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_AENCTYPE_CMD 13BMC:Galil7:m73_AENCTYPE_CMD Normal Quadrature (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_AENCTYPE_STATUS 13BMC:Galil7:m73_AENCTYPE_STATUS Normal Quadrature (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73.ERES 13BMC:Galil7:m73.ERES 0.0001 (base) [epics@corvette ~]$ caget 13BMC:Galil7:m73.MRES 13BMC:Galil7:m73.MRES 0.0001 Thanks, Mark From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Clift via Tech-talk <tech-talk at aps.anl.gov> Hi Mark, On my test system, using a motor with incremental encoder, I can set the position and RRBV updates to the new value. So I am unable to reproduce the error at this time. Setting a new motor position involves setting the position on the controller and then reading the position back in the poll cycle. I recommend checking if the value is written to the hardware correctly by using Galil commands DEx=?, DPx=?
(where x is the motor in range A-H). I'd need to know the motor type to determine which of the above 2 commands to use, so I recommend trying both of the above commands. At the bottom of the DMC controller screen, is a console where folks can type Galil
commands whilst the driver is running. If the value is not written to hardware I recommend checking GalilAxis::setPosition and GalilAxis::setEncoderPosition methods to find where the write to hardware is failing. Generally speaking with stepper motors, ERES and MRES are different values and both must be set if an encoder is used. With servo motors ERES, and MRES are normally the same. The GalilAxis::poller method reads the motor readback position from hardware, it's a good place to look if the driver isn't reading the value from the hardware correctly. Ensure dual feedback mode is off with DFx=0. If DFx=1 then the main and auxiliary encoder registers are swapped. If no solution is found, could you please report the value of the following records on your system: $(P)$(M)_MTRTYPE_CMD $(P)$(M)_MTRTYPE_STATUS $(P)$(M)_MENCTYPE_CMD $(P)$(M)_MENCTYPE_STATUS $(P)$(M)_AENCTYPE_CMD $(P)$(M)_AENCTYPE_STATUS $(P)$(M).ERES $(P)$(M).MRES And I will try again to reproduce the problem. Kind regards, Mark Clift |