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

Subject: RE: warnings.warn from raspberry pyepics
From: LE-DANIEL Erwann via Tech-talk <tech-talk at aps.anl.gov>
To: Matt Newville <newville at cars.uchicago.edu>
Cc: "tech-talk-request at aps.anl.gov" <tech-talk-request at aps.anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 19 Sep 2022 16:30:55 +0000

YES ! you were True !

I effectively created lot of “instance” of PV !!

 

Your solution works perfectly ! !

 

THANK YOU VERY MUCH !

 

Cordialement,

LE DANIEL Erwann.

 

De : Matt Newville <newville at cars.uchicago.edu>
Envoyé : lundi 19 septembre 2022 18:25
À : LE-DANIEL Erwann <erwann.le-daniel at alstomgroup.com>
Cc : Mark Rivers <rivers at cars.uchicago.edu>; tech-talk-request at aps.anl.gov; tech-talk at aps.anl.gov
Objet : Re: warnings.warn from raspberry pyepics

 

CAUTION: This email was sent from outside Alstom. Be vigilant if you want to click on links or open attachments.

Hi,

 

On Mon, Sep 19, 2022 at 10:57 AM LE-DANIEL Erwann <erwann.le-daniel at alstomgroup.com> wrote:

True, It works and return values from network during few seconds and after the loop speed decrease and the error message occures.

 

 

OK.  Then, I'm less sure about what is going on.  Creating multiple instances of a PV in a loop would be an odd thing to do, though it will not create completely new connections to the CA Channel: `epics.ca._cache` should only have one Channel in it, though it will retain a large number of callbacks that are no longer accessible.  I don't know if there is a limit on the number of PVs that can be created - your script runs to at least 3000 times for me, though I did not test with raspberry pi.

 

But: For sure, creating a PV and then fetching its value repeatedly is recommended:

 

p = epics.PV(‘TL_AN_Input’)

while True:

               val = p.get()

               print (val)

               time.sleep(0.1)

 

There is also `epics.get_pv` which will get a cached PV or create one if needed:

 

while True:

               p = epics.get_(‘TL_AN_Input’)

               val = p.get()

               print (val)

               time.sleep(0.1)

this will prevent the creation of thousands of useless callbacks.

 

--Matt

 

In case of strong suspicion of phishing, report the email through the reporting tool on your Outlook toolbar or send it as an attachment to spam at alstomgroup.com



CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.

References:
warnings.warn from raspberry pyepics LE-DANIEL Erwann via Tech-talk
Re: warnings.warn from raspberry pyepics Matt Newville via Tech-talk
Re: warnings.warn from raspberry pyepics Mark Rivers via Tech-talk
RE: warnings.warn from raspberry pyepics LE-DANIEL Erwann via Tech-talk
Re: warnings.warn from raspberry pyepics Matt Newville via Tech-talk

Navigate by Date:
Prev: Re: warnings.warn from raspberry pyepics Matt Newville via Tech-talk
Next: CS-Studio data source issue Zhang, Tong via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Re: warnings.warn from raspberry pyepics Matt Newville via Tech-talk
Next: Cant caget from different IOC server Marco A. Barra Montevechi Filho via Tech-talk
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  <20222023  2024 
ANJ, 20 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·