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  <20132014  2015  2016  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: seq and synchronous writes
From: Mark Rivers <[email protected]>
To: "'Konrad, Martin'" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 5 Sep 2013 19:58:03 +0000
The problem is that synchronous puts to the motor record wait for the motor to stop moving, or the timeout (10 seconds default) to occur.  You don't want to use SYNC here.

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Konrad, Martin
Sent: Thursday, September 05, 2013 2:55 PM
To: [email protected]; [email protected]
Subject: seq and synchronous writes

Hello,
I am using a state machine to control a motor setup. In each step it 
basically sends a command to the motor record and waits for it to 
complete. This can be detected by the "done moving" field (DMOV).

Here is how I implemented this:

state1 {
   entry {
     sprintf(stateMsg, "state 1");
     pvPut(stateMsg);
   }

   when(foo) {
     motor = bar;
     pvPut(motor, SYNC);
   } state state2
}

state2 {
   entry {
     sprintf(stateMsg, "state 2");
     pvPut(stateMsg);
   }
}

Unfortunately this leads to a long delay between the motor starting to 
move and the update of the status message (sometimes 10 seconds!).

I suspect I'm using sequencer the wrong way here. Are synchronous pvPuts 
necessary to make sure the command has been send to the motor record? 
Should I move the pvPut line to the end of the entry block of state2? 
Are there some best practices how to keep the state machine code clean 
and readable?

Thanks,

Martin



References:
seq and synchronous writes Konrad, Martin

Navigate by Date:
Prev: Re: seq and synchronous writes Pete Jemian
Next: Re: seq and synchronous writes Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: seq and synchronous writes Pete Jemian
Next: Re: seq and synchronous writes Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·