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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: How can I use pvapy or p4p to monitor multiple PVS |
From: | "Veseli, Sinisa via Tech-talk" <tech-talk at aps.anl.gov> |
To: | tech-talk <tech-talk at aps.anl.gov>, "qt980319 at mail.ustc.edu.cn" <qt980319 at mail.ustc.edu.cn> |
Date: | Tue, 13 Oct 2020 14:32:13 +0000 |
Hello,
Here are the pvapy examples that monitor multiple channels:
The above should work for tens of thousands pv's that update at a rate of 1Hz or so.
Also, the latest pvapy documentation can be found here:
https://epics.anl.gov/extensions/pvaPy/production/index.html.
Best Regards,
Sinisa
--
Siniša Veseli
Scientific Software Engineering & Data Management
Advanced Photon Source
Argonne National Laboratory
sveseli at anl.gov
(630)252-9182From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of =?utf-8?b?56em5aSpIHZpYSBUZWNoLXRhbGsgPHRlY2gtdGFsa0BhcHMuYW5sLmdv?=@aps.anl.gov <=?utf-8?b?56em5aSpIHZpYSBUZWNoLXRhbGsgPHRlY2gtdGFsa0BhcHMuYW5sLmdv?=@aps.anl.gov>
Sent: Tuesday, October 13, 2020 7:18 AM To: Rivers, Mark L. <rivers at cars.uchicago.edu>; Marty Kraimer <mrkraimer at comcast.net>; tech-talk <tech-talk at aps.anl.gov> Subject: Re: How can I use pvapy or p4p to monitor multiple PVS Thank you for your answer.I've solved my problem.
What Mark said should work.Note that pvaPy also has methods: subscribe,unsubscribe,startMonitor,stopMonitor. For example | def echo(x): | print 'New PV value: ', x | channel = Channel('exampleFloat') | channel.subscribe('echo', echo) | channel.startMonitor() Marty -------------------------------------------------------------------------------------------------------------------------------------------------------
However, in the process of testing it, it was found that only a single PV can be monitored In p4p can’t you just call the monitor() method multiple times, once for each PV that you want to monitor? In pvapy can’t you just create a Channel object for each PV, and call it’s monitor() method? Mark |