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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: How to reset encoder counts after controller power off
From: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: 岳宗仰 <yuezy at ihep.ac.cn>, tech-talk at aps.anl.gov
Date: Thu, 3 Aug 2023 11:55:51 -0500
The DVAL is the position field that is usually autosaved. The readback fields (RBV, DRBV, and RRBV) are not writable and cannot be restored by autosave.

The setPosition method of a model-3 motor driver is called when an autosaved position is restored. The position argument should be the DVAL to be restored divided by the MRES, which should have units of steps.

What happens when the setPosition method sends the command to the controller to redefine the position is obviously controller-dependent. The RMP and REP fields are usually updated by queries of the theoretical (motor) and feedback (encoder) positions in the controller or axis poll methods.

Whether or not the motor record accepts the restored position depends on the RSTM field. The "normal" motor record behavior is discard the restored position if the controllers position is sufficiently non-zero (>RDBD). This results in setPosition not being called.

I don't know why the RMP/REP fields would change when setting using SET to redefine the VAL field, but not when VAL was restored by autosave.

I do have some questions, however:

1. What is the value of the FOFF field? Does OFF remain constant when restarting the IOC?

2. Does the problem persist if the DVAL field is autosaved instead of the VAL field?

3. What is the output of the following command after the IOC is done booting:

  epics> dbpr "xxx:m1", 9

Kevin



On 7/13/23 08:41, 岳宗仰 via Tech-talk wrote:
Hi, tech-talk,

I have a motion controller, and write driver support for it by model 3.


After power off, the pulse information and encoder counts of motor has been lost, and we want to save this informations.


The setPosition(double position) has been rewrote.(I think this method is used for autosave)

Through it, I can reset the pulse counts at any position.

$caput xxx.m1.SET 1

$caput xxx:m1.VAL 0


So I use autosave module, and save the .RBV and .VAL PV.

After IOC and controller restart, the .RBV and .VAL PV has been changed, But .RMP, .REP PV not changed and the register of pulse counts of controller also not change.

Have you met this case?

I would appreciated some suggestions.


Zongyang yue

Thanks


References:
How to reset encoder counts after controller power off 岳宗仰 via Tech-talk

Navigate by Date:
Prev: Re: archiver appliance - PVs not reconnecting Ralph Lange via Tech-talk
Next: Re: archiver appliance - PVs not reconnecting Hu, Yong 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  <20232024 
Navigate by Thread:
Prev: How to reset encoder counts after controller power off 岳宗仰 via Tech-talk
Next: LINK_ALARM in records Florian Feldbauer 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  <20232024 
ANJ, 03 Aug 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·