EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: snc delay()
From: "Brian McAllister" <[email protected]>
To: Ian A Smith <[email protected]>
Cc: [email protected]
Date: Thu, 02 May 2002 19:59:04 -0400
>>> On 5/2/2002 at 13:42:32 -1000, Ian A Smith wrote:

  > the snc manual says that the delay() function can only be used inside a
  > when expression.  Is this really true?  Isn't it just a finction that
  > returns true or false?  I want to use it inside a for statement.

Sorry, you can't do that.

When a state containing delay() clauses is entered, a timer is started for
each one (in the context of the main sequencer task, I think) which is then
checked by the sequencer along with any other when() tests in that state.

There is a function that returns true when the timer expires, and you could
potentially make use of this mechanism by writing escaped C code, but you
would have to be very careful.

Keep in mind that if you do anything in a when() clause that blocks
execution, you will suspend *all* sequencers for that time.  Using
taskDelay() will allow other tasks to continue, but not other sequencers.

Looking at the generated C code may make it clearer how this works.

----
Brian McAllister                    Controls Programmer/Beam Physicist
[email protected]                        MIT-Bates Linear Accelerator
(617) 253-9537                                           Middleton, MA



References:
snc delay() Ian A Smith

Navigate by Date:
Prev: RE: snc delay() Chestnut, Ronald P.
Next: Re: EPICS Base Bug Report Marty Kraimer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: snc delay() Ian A Smith
Next: RE: snc delay() Chestnut, Ronald P.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·