Hi Mark,
I can't help with most of these questions, but there is one part that I can:
On 08/06/2014 08:54 AM, Mark Rivers wrote:
> The final error is:
>
> /corvette/home/epics/devel/seq-2-2-0-1/bin/linux-x86/snc getFilledBuckets.i -o getFilledBuckets.c
> ../getFilledBuckets.st:151: error: calling built-in function delay not allowed here
>
> Line 151 is the delay(1.0) statement in the code below:
>
> when((srInjectStatus == NOTINJECTING) &&
> (srBeamStatus) == STOREDBEAM) {
> delay(1.0); /* 1 sec delay */
>
> Is this error due to this change in 2.2.0:
>
> "Since calling delay outside of the condition of a state transition never had any useful effect, it is now disallowed."
The delay() function in SNL has never been equivalent to an
epicsThreadSleep(), it has always returned immediately, it's just that
the return value will be zero until the state set has been in the
current state for at least the delay time, after which it will return a
non-zero value. Therefore the call to delay(1.0) in the above SNL code
does nothing in any version of the sequencer (I'm not sure whether the
Ben's statement about the delay function not doing anything means its
return value would never change outside of a when condition, but in the
above case the return value is being discarded anyway).
In general it is not a good idea to insert calls to epicsThreadSleep()
into sequencer code as this freezes the state set and prevents other
possible transitions from taking place until this delay and the
remaining statements in this action have completed.
- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- References:
- Sequencer 2.2.0 Benjamin Franksen
- RE: Sequencer 2.2.0 Mark Rivers
- Navigate by Date:
- Prev:
VDCT priya tiwari
- Next:
Re: Sequencer 2.2.0 Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
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:
RE: Sequencer 2.2.0 Mark Rivers
- Next:
Re: Sequencer 2.2.0 Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|