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  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: Problems setting motor position on Galil controller
From: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 19 Jan 2024 08:53:50 -0600
Mark,

It seems like the command sent in the GalilAxis::setEncoderPosition method might be failing:


https://github.com/motorapp/Galil-3-0/blob/eb8b8c32c481374f34656faf3bca0df48e7a39c8/3-6/GalilSup/src/GalilAxis.cpp#L1354

The status from the sync_writeReadController() call is saved and returned:

https://github.com/motorapp/Galil-3-0/blob/eb8b8c32c481374f34656faf3bca0df48e7a39c8/3-6/GalilSup/src/GalilAxis.cpp#L1358

But the setPosition method returns asynSuccess unconditionally, so the IOC wouldn't know if setting the encoder position failed.

It doesn't look like asyn traces would be very helpful; sync_writeReadController doesn't appear to print anything when errors occur:

https://github.com/motorapp/Galil-3-0/blob/eb8b8c32c481374f34656faf3bca0df48e7a39c8/3-6/GalilSup/src/GalilController.cpp#L5470-L5563

Can you use a debugger or add an asyn trace message to see what the setEncoderPosition return value is?

Kevin

On 1/18/24 18:28, Mark Rivers via Tech-talk wrote:
Folks,

I am having 2 serious issues with using “set” mode in the motor record to set the current motor position on a Galil controller.

  * It works fine to set the position when the motor is not using an
    encoder and when not at a hard limit.  Setting the position sets
    both the drive values (VAL, DVAL, RVAL) and the readback values
    (RBV, DRBV, RRBV).
  * When setting the position of a motor with an encoder the VAL, DVAL,
and RVAL are set correctly.  However, the readbacks are not set. This means that subsequent moves are not correct, because they act
    as if the motor is currently at the readback position, and move by
    the wrong amount.  I have attached a screenshot (Set_to_0_at_1.png)
    showing a motor that had been at DVAL=1, and then I set it to
    DVAL=0.  Note that the readbacks are still for DVAL=1.
  * If the motor has an encoder and is at a hard limit when I set the
    position then the result is that RVAL gets set to -2^31.  The system
    is totally unusable, because it now thinks the motor is outside the
    soft limits.  This is shown in screen shot
    Set_to_0_at_-10_on_limit.jpg.  The motor was on a limit with a DVAL
of about -10.7.  I set the position to 0, and now the DVAL is -107374. Note that driving to a limit and then setting the position is a common operation, because we know what the absolute position of the limit switch is.  But this does not work at all with the Galil.

Have others seen these problems?  Am I doing something wrong?

Thanks,

Mark


References:
Problems setting motor position on Galil controller Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Danfysik system 8000 and 9100 power supplies Andrei Guinancio de Carvalho Pereira via Tech-talk
Next: RE: Galil advice for servo motors 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  2023  <2024
Navigate by Thread:
Prev: Re: Problems setting motor position on Galil controller Torsten Bögershausen via Tech-talk
Next: RE: Problems setting motor position on Galil controller 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  2023  <2024
ANJ, 19 Jan 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·