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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Weird behaviour in wait=True when using epics.Motor.get(something,something,wait=True) |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | Matthew Newville <newville at cars.uchicago.edu>, "Marco A. Barra Montevechi Filho" <marco.filho at lnls.br> |
Cc: | SWC <swc at lnls.br>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 17 Jan 2023 17:11:47 +0000 |
Hi Marco,
I think there may be a complication with the motor record, and other complex records like
mca, scaler, etc. Using Python put(wait=True) means you are using ca_put_callback() in the underlying Channel Access C code. ca_put_callback() completes when the record calls recGblFwdLink(). For those complex records recGblFwdLink() is called when the
record is "done". For the motor record that means that a move is complete, for the mca and scaler record it means acquisition is complete. I think this means that if a move is in progress when writing to CNEN then that write will only complete when the move
is complete, so it could take a long time.
Tim Mooney may correct me if my understanding is wrong.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Marco A. Barra Montevechi Filho via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, January 17, 2023 10:53 AM To: Matthew Newville <newville at cars.uchicago.edu> Cc: SWC <swc at lnls.br>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: Weird behaviour in wait=True when using epics.Motor.get(something,something,wait=True) Thanks, Matt.
In my tests, put("CNEN",value,wait=True) returns in much less than 10 seconds, so i dont think this is the case. Something interesting: i had the same problem with VELO field so im guessing problem is with my understanding about how the IOC works in general, not an actual communication with hardware problem. Best regards, Marco From: Matt Newville <newville at cars.uchicago.edu>
Sent: 17 January 2023 13:30 To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br> Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; SWC <swc at lnls.br> Subject: Re: Weird behaviour in wait=True when using epics.Motor.get(something,something,wait=True) To follow up on Torsten's comment, the default timeout for a `epics.Motor.put()` is 10 seconds. The behavior you are seeing could be because the processing of setting CNEN takes more than
that 10 seconds.
Giving a longer timeout to the `put()` might clarify what is happening.
On Mon, Jan 16, 2023 at 3:27 PM Marco A. Barra Montevechi Filho via Tech-talk <tech-talk at aps.anl.gov> wrote:
|