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 14:32:34 +0800
hi, Ben:

As mentioned on website (http://www-csr.bessy.de/control/SoftDist/sequencer/Tutorial.html#built-in-pv-functions),  I try to get Status of Process Variables, for example, use
printf("v1t1 ts1 is %d\n",pvTimeStamp(v1t1).secPastEpoch);
but on IOC shell, it show the value 0. if I use pvTimeStamp(v1t1).nsec, the same value 0.
Surely If I try the embedded C function in SNL, and use:   
epicsTimeGetCurrent(&pd);
printf("nano second is %i\n",pd.nsec); 
it can get the timestamp. But I wonder why the build function can't display correctly? Am I missing sth.?
Ps, v1t1 is a test record, SNL runs on the same computer.
Highly appreciated for your help.


 
 

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

References:
exit puzzle about SNL's example Silver
Re: exit puzzle about SNL's example Benjamin Franksen

Navigate by Date:
Prev: Re: Re: exit puzzle about SNL's example Silver
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 
Navigate by Thread:
Prev: Re: exit puzzle about SNL's example Benjamin Franksen
Next: Re: What happened to "dbNameOfPV" in EPICS 3.15.1 : Need this for caPutLog 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 ·