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  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: Re: Sequencer remote pvPut CA delay (specified behavior?)
From: Benjamin Franksen <benjamin.franksen@helmholtz-berlin.de>
To: EPICS Techtalk <tech-talk@aps.anl.gov>
Date: Tue, 14 Feb 2017 14:45:19 +0100
On 13.02.2017 23:53, Andrew Johnson wrote:
> [...] Consider rewriting the state machine and
> using a separate when(delay(5)) state transition for the delay instead.
> 
> I think doing this will also have an effect on your results; I don't
> know the internals of the sequencer, but I suspect it flushes the CA
> output queue at the end of each set of actions, not between individual
> action statements.

Yes. More specifically, CA output buffer always gets flushed right
before a state set thread blocks in order to wait for an event, i.e.

 * before when-conditions in a state are evaluated, and

 * whenever pvGet or pvPut are called with the extra SYNC flag that
   makes them wait for completion.

> Your epicsThreadSleep() call appears in the middle of
> the set of actions though, so a flush at the end of the when() {} block
> won't have a chance to run until after the second pvPut() call has run
> anyway, thus causing the effect that you're seeing.

Yes, I also guess this is the reason for the behaviour Tobin sees.

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

Attachment: signature.asc
Description: OpenPGP digital signature


References:
Sequencer remote pvPut CA delay (specified behavior?) Tobin Weber
Re: Sequencer remote pvPut CA delay (specified behavior?) Andrew Johnson

Navigate by Date:
Prev: Re: Driver for New Focus 8732 Picomotor Multi-Axis Driver Nilson Pereira
Next: RE: Logbook entry error Patard Charles-Henri
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
Navigate by Thread:
Prev: Re: Sequencer remote pvPut CA delay (specified behavior?) Tobin Weber
Next: Problem compiling areaDetector-2-5 Marcin Lukaszewski
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
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·