>>> On 10/18/2001 at 17:33:12 +0200, David Maden wrote:
> However, when I boot the ioc, the motor record does not seem to pick up
> the initial value of the encoder and its DVAL field is zero. I do not
> seem to be able to restore the DVAL field of the motor at iocInit time
> via the save_restore mechanism.
I solved exactly this problem today. Note that this is with version 3.4 of
the motor record, but I'm pretty sure none of the relevant behavior has
changed.
The feature you need to use is the SET/USE mode control.
The procedure is as follows:
1) put <motor>.SSET 1
- sets record to SET mode
2) put <motor>.VAL 1
- causes .VAL and related fields to be set from
the readback link value. This also requires the record
to be processed, so a DB link must be PP.
3) put <motor>.SUSE 1
- sets record to USE mode
This procedure can be automated using a sequence record. Set PINI=YES so
it gets processed when the database initializes.
It may be necessary to use a delay in the sequence record to guarantee that
the readback value is valid before the motor record uses it. I used a 10
second delay because the readback PV is on a different IOC (5 seconds
wasn't enough).
----
Brian McAllister Controls Programmer/Beam Physicist
[email protected] MIT-Bates Linear Accelerator
(617) 253-9537 Middleton, MA
- References:
- Motor Record with Encoder David Maden
- Navigate by Date:
- Prev:
EPICS R3.13.4 Build question??? Leonard J. Reder
- Next:
RE: EPICS R3.13.4 Build question??? Jeff Hill
- 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: Motor Record with Encoder Ronald L. Sluiter
- Next:
Summary: Motor Record with Encoder David Maden
- 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
|