EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Design Question
From: Tim Mooney <[email protected]>
To: Mathias Steiner <[email protected]>
Cc: [email protected]
Date: Fri, 30 Dec 2005 16:26:54 -0600


Mathias Steiner wrote:
Learned Friends,

I have a question regarding software design: How does everyone solve the problem of sequence in EPICS?

I ran afoul of this some years ago, when I wrote code to set a group of power supplies along a beamline; FIRST, the EPICS channel representing magnetic rigidity would be set, THEN the magnets were told to go set themselves to that rigidity.

Needless to say, half the magnets started setting themselves to the previous rigidity, because in the world of ethernet, there is no such thing as "do-this-then-do-that".

I found a workaround that is effective but inelegant, and I was wondering if there was an accepted way of handling this issue.

I don't know about any generally accepted way--I've seen very little
communication among collaborators about database-programming methods.
In my own experience, however, I've found the same thing you've found:
establishing an *execution* sequence is relatively easy, and can be done
in several different ways, but ensuring that data generated by the
sequenced execution shows up in the right places at the right times
is not as easy, and not all of the methods that ensure correct execution sequencing will also ensure correct data-delivery sequencing.


The only sure way I've found to do this is to arrange that data is
systematically "pushed", rather than "pulled".  A put operation ensures
that data arrives before the execution that needs to use the data.  As
you've shown, a get operation does not carry this assurance, especially
when the data is from a different ioc.  Certainly data can be posted in
correct sequence (that's just execution ordering), but there's no
guarantee that data will actually be *delivered* to an input link before
the processing that requires the data occurs.

In the application you describe, distributing the data with put operations
is probably not what you'd really prefer to do, because doing so requires
that the generator of the data know all of the recipients.  You'd probably
prefer that the generator only be responsible for the data.  But *somebody*
has know all the recipients, and whoever does must be written to by the
generator and must write to the recipients, otherwise you leave open the
possibility that execution will occur before the data has arrived.

--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.

References:
Design Question Mathias Steiner

Navigate by Date:
Prev: Design Question Mathias Steiner
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Design Question Mathias Steiner
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·