EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  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  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Initializing a mbboDirect record
From: Ned Arnold <[email protected]>
To: "J. Frederick Bartlett" <[email protected]>
Cc: APS tech-talk <[email protected]>
Date: Fri, 10 Oct 2003 13:33:58 -0500
Fritz,

Some techniques I have seen and/or used for this ...

- Use save/restore to maintain the value of the mbboDirect
  records through reboot. This is NOT foolproof, but often
  adequate for non-critical equipment.

- Define the mbboDirect records as "disabled" when they are loaded
  (DISA=DISV). Implement a sequence record or sequence program to
  initialize the val field with the proper value (from a readback
  PV that has already processed) right after enabling it (same lock
  set).

- Implement it in the device/driver as you suggested.


I'm sure there are other approaches as well ...


Ned


J. Frederick Bartlett wrote:
  I have a set of mbboDirect records using asynchronous device support to
access a hardware register in which the individual bits control power
switches. I need to automatically initialize the VAL field of the mbboDirect
record at IOC reboot time to the contents of the hardware register.

  This is an example of the not uncommon read-modify-write (RWM) problem in
which sub-groups of bits in a hardware register must be modified without
affecting the values of the remaining bits. This particular instance is
complicated by the asynchronous nature of the hardware access protocol which
does not allow an instantaneous read of the current value of the register.

  I could finesse the problem by modifying (1) our driver support package
(for the MIL/STD1553B bus) to implement a RMW at the interrupt service
routine level (the interrupt action for the read operation would modify the
just-read value and initiate a write of the modified value, leading to a
second interrupt that completes the driver operation) or (2) our device
support package so that the RMW is achieved through a state machine that
steps from the "read" state to the "write" state with successive callbacks
from the driver. The former would be "atomic" while the latter would not.

  Can anyone suggest how the existing features of EPICS records might be
used to initialize the mmboRecord - i.e. an automatic, one-time operation at
reboot?

Fritz




References:
Initializing a mbboDirect record J. Frederick Bartlett

Navigate by Date:
Prev: Initializing a mbboDirect record J. Frederick Bartlett
Next: RE: database expansion in R3.14.4 Thompson, David H.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Initializing a mbboDirect record J. Frederick Bartlett
Next: EPISC meeting agenda Bob Dalesio
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·