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: Re: exit puzzle about SNL's example
From: Silver <[email protected]>
To: tech-talk <[email protected]>
Date: Tue, 13 Jan 2015 11:34:21 +0800
hi, Ben:

Thanks you very much for your detailed explanation.
Another question: 
If I use efSet() function in the program and run SNL with IOC, when I quit IOC shell, it will give a message like following:
epicsThreadOnceOsd: pthread_mutex_lock returned Invalid argument.
Need I free mutex in EXIT? if needed, how to ?
Also, if I try to print some message in EXIT part, but when I quit IOC shell, the print message will not be displayed, is it right?
 
 
 
 

Best wishes
Geyang 2015-01-13
 
 
 
Date: 2015-01-12 20:31
CC: Silver
Subject: Re: exit puzzle about SNL's example
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: exit puzzle about SNL's example Benjamin Franksen
References:
exit puzzle about SNL's example Silver
Re: exit puzzle about SNL's example Benjamin Franksen

Navigate by Date:
Prev: EPICS motor module R6-9 Ron Sluiter
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 
Navigate by Thread:
Prev: Re: exit puzzle about SNL's example Benjamin Franksen
Next: Re: exit puzzle about SNL's example Benjamin Franksen
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 ·