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  2013  2014  <20152016  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: pyepics not updating pv.enum_strs after connection
From: Jameson Graef Rollins <[email protected]>
To: Matt Newville <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Wed, 18 Mar 2015 20:09:37 -0700
On Wed, Mar 18 2015, Matt Newville <[email protected]> wrote:
> Sorry for the confusion.  The surest way to ensure you have enum strings
> and other CTRL attributes is to do
>
>    pv.get_ctrlvars()
>
> This should happens by default in many situations where you need to know
> the CTRL variables (say, putting a string for the name to enum PV, or
> getting with 'as_string=True').  Of course, a PV can't get look up its enum
> strings if it's not connected.

Hi, Matt.  Thanks so much for the response.  Unfortunately using
get_ctrlvars doesn't seem to help.  Or at least I can't figure out how
to use it properly.

I've tried setting "with_ctrlvars=True" when adding the callback (which
is supposed to be the default anyway), but enum_strs is still None in
the arguments passed to the callback.

If I explicitly retrieve the pv in the callback (via 'cb_info') and call
pv.get_ctrlvars() directly, I'm consistently returned an empty dict.
Furthermore, this call takes a very long time to return, apparently
after hitting a timeout.

Other methods on the pv retrieved from 'cb_info' are timing out as well.
It's almost as if the PV being supplied to the callback isn't actually
the same PV attached to the callback.

This is my first application that relies heavily on PV callbacks, so I
could be doing things improperly.  Everything else seems to be working
great, though.  It's just the enums that I seem to have no way of
resolving.

jamie.

Attachment: signature.asc
Description: PGP signature


Replies:
Re: pyepics not updating pv.enum_strs after connection Matt Newville
References:
pyepics not updating pv.enum_strs after connection Jameson Graef Rollins
Re: pyepics not updating pv.enum_strs after connection Jameson Graef Rollins
Re: pyepics not updating pv.enum_strs after connection Matt Newville

Navigate by Date:
Prev: Re: pyepics not updating pv.enum_strs after connection Matt Newville
Next: Re: Increment array counter for NDFileModeSingle Hinko Kocevar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: pyepics not updating pv.enum_strs after connection Matt Newville
Next: Re: pyepics not updating pv.enum_strs after connection Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·