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 <2025> | 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 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: I implemented the Model 3 of EPICS motor driver support, but the VAL and RBV of motor record are zero after IOC reboot. |
From: | LiangChih Chiang via Tech-talk <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Thu, 2 Jan 2025 11:26:31 +0800 |
To explain a little more, it is important that the driver has completed the first poll cycle for the position and status of each axis before iocInit. This is because the motor record looks at those positions during iocInit, and if there are non-zero it uses those values as the current position. You can add the following to your startup script after you create the controller and axes to sleep for 1 second.
epicsThreadSleep(1.0)
Let us know if this does not fix the problem.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Torsten Bögershausen via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, November 20, 2024 5:15 AM
To: LiangChih Chiang <yehnan174 at gmail.com>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: I implemented the Model 3 of EPICS motor driver support, but the VAL and RBV of motor record are zero after IOC reboot.Hej,
without having seen ypur code, I would speculate that you run
into a not-unknown issue using Model 3 motors, connected via
a serial cable, USB or Ethernet?
The value that the motorRecord needs is read from the driver,
wich must have been able to read it from your hardware.
Here are ESS we have a patched motor, which can handle this.
If you use the upstream version, the easist workaround may be
to add a sleep() after the createController() line in your st.cmd
HTH
/Torsten
On 2024-11-20 09:47, LiangChih Chiang via Tech-talk wrote:
> Hello, EPICS mates.
>
> I implemented the Model 3 of EPICS motor driver support for some motor
> controller,
> but the VAL and RBV of the motor record are zero after IOC reboot.
>
> I think the motor record doesn't restore the values of motor pulse and
> encoder count from the motor controller after IOC reboot.
>
> What member functions of asynMotorController and asynMotorAxis classes
> should I implement?
>
>
> Best regards.
>