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  <20182019  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: device support for bidirectional records
From: Michael Davidsaver <[email protected]>
To: "Thomas, Patrick" <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 24 Jan 2018 13:41:31 -0800
On 01/24/2018 01:09 PM, Thomas, Patrick wrote:
> Hi,
> 
> 
> I was wondering if there is a current recommended method for implementing device support for bidirectional records. That is, records that both write values that are obtained through EPICS to a device and also update their value to reflect the status of the device when it changes through means outside of EPICS.

Not really.  I don't have any example to show you because I go out of my way to avoid having bi-directional setting records.
This turns out to be thorny problem if you want to be certain to avoid all possible races, and depends on how the underlying
communications/hardware works.  My preference is to have separate setting and readback records.

At core, your device support needs to have an internal flag to indicate why it is processing.
Whether for a new setting, or to synchronize.  See my comments on https://github.com/epics-modules/asyn/issues/56

The discussion on this issue, and the related pull request, may give you an idea of why it is
so hard to avoid races when asynchronous communications are involved.

What is comes down to is that synchronizing a true multi-master system is difficult to do entirely in software,
and EPICS doesn't have a generic solution.

> On a related note, are there versions of the standard output records (bo, ao, longout, etc.) that have a separate readback field in engineering units?
> 
> 
> Thank you for your time,
> 
> Patrick
> 


References:
device support for bidirectional records Thomas, Patrick

Navigate by Date:
Prev: RE: device support for bidirectional records Mark Rivers
Next: More streamDevice and Asyn issues... Rod Nussbaumer
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: device support for bidirectional records Mark Rivers
Next: More streamDevice and Asyn issues... Rod Nussbaumer
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 24 Jan 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·