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  <20152016  2017  2018  2019  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: exit puzzle about SNL's example
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Mon, 12 Jan 2015 13:31:07 +0100
On Monday 12 January 2015 12:52:53 Silver wrote:
> On the website of
> EPICS Sequencer Home, there are several examples about SNL which use
> exit in two places.?
>
> The first one is
> in the example "Entry and exit action example" ,that exit part will
> execute one time when the state changes from high to low. and, if use
> "option -e" switch, the entry will be executed each time, not as
> expected. Without "option -e" switch, it will run as the document's
> behavior, did I make some mistake??

No, this is a bug in the Tutorial. It seems I mixed it up when I re-
wrote it. Thanks for the report, will fix this.

BTW, if in doubt, you should always consult the SNL Language Reference.
It says:

"""
+e
   Execute `entry` blocks only if the previous state was
   not the same as the current state. This is the default.

-e
   Execute `entry` blocks even if the previous state was the same
   as the current state.

+x
   Execute `exit` blocks only if the next state is not the same as
   the current state. This is the default.

-x
   Execute `exit` blocks even if the next state is the same as
   the current state.
"""

Just wrote a regression test to make sure this is really what's
happening.

> The second one is
> in the “Complex example “
> (http://www-csr.bessy.de/control/SoftDist/sequencer/Examples.html#exi
> t-procedure)
> Exit is a separate
> part out of state set,?I am wondering when that exit procedure will be
> executed??

The reserved words 'entry' and 'exit' are overloaded. Inside a state
they denote entry/exit actions executed when entering/leaving a state,
respectively. On the top level (i.e. outside state sets) they denote
entry/exit actions that are executed before state sets got to their
first state / after they finish executing, respectively. (The word
'exit' can be used in yet more contexts, see the language reference for
details.)

Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
Re: Re: exit puzzle about SNL's example Silver
Re: Re: exit puzzle about SNL's example Silver
References:
exit puzzle about SNL's example Silver

Navigate by Date:
Prev: EPICS V4 on Windows freddie.akeroyd
Next: Looking for MRF PCIE-EVR-300 driver on linux Xu, Shifu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: exit puzzle about SNL's example Silver
Next: Re: Re: exit puzzle about SNL's example Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·