Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: snc/seq enhancements ... local-variable access
From: Tim Mooney <mooney@aps.anl.gov>
To: Eric Norum <norume@aps.anl.gov>
Cc: "Laznovsky, Michael" <lazmo@slac.stanford.edu>, tech-talk@aps.anl.gov
Date: Thu, 06 Apr 2006 16:03:29 -0500


Eric Norum wrote:
I agree with Michael that turning seq from a DFA into an arbitrary procedural language interpreter is not a good thing.

On Apr 6, 2006, at 1:09 PM, Laznovsky, Michael wrote:

Hi- while this might be fairly easy to do given the way seq does its
internal bookkeeping, seems to me it would muck up the relatively clean
DFA state-machine model we have now. I've handled cases like you describe
(e.g. an "ABORT" button that allows interrupting a long series of states)
by adding extra intermediate states, as in:


    state A
    {
        entry {
            flag = OK;
        }
        when (<event>) {
            if (trouble) flag = BUBU;
        } state A_check
    }

state A_check
{
when (flag == BUBU) { /* uh oh! */
} state A_abort
when () {
} state B /* next state */
}


The "out-of-order" transitions I mentioned referred to a future debugging
environment, where it might be useful to interactively force a transition
to an arbitrary state.

Looks like I could use some instruction on the value and use of a DFA. All my SNL programs look like this:

state monitor {
   when (A && B && C && D && E) {
       ...
   } state action1
   when (A && B && C && D && !E) {
       ...
   } state action2
}

Ok, I'm exaggerating, but only a little.  Nevertheless, it's true
that MOST of the things I need to to in EPICS that can't easily be
done in a database end up looking like the above.  Maybe someone
knowledgeable could give a short course in how things really should
be done in SNL.

--
Tim Mooney (mooney@aps.anl.gov) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.

References:
RE: snc/seq enhancements ... local-variable access Laznovsky, Michael
Re: snc/seq enhancements ... local-variable access Eric Norum

Navigate by Date:
Prev: Re: snc/seq enhancements ... local-variable access Eric Norum
Next: Button push confirmation Chestnut, Ronald P.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: snc/seq enhancements ... local-variable access Eric Norum
Next: ld error: Module contains undefined symbol(s) and may be unusable. Porter, Rodney R.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·