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  <20202021  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: How can I use pvapy or p4p to monitor multiple PVS
From: 秦天 via Tech-talk <tech-talk at aps.anl.go@aps.anl.gov, v>@aps.anl.gov
To: "Mark Rivers" <rivers at cars.uchicago.edu>, "Marty Kraimer" <mrkraimer at comcast.net>, tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 13 Oct 2020 20:18:07 +0800 (GMT+08:00)
Thank you for your answer.I've solved my problem.
I need to loop to create an associated class object for each pv.Then use each class object to execute the monitor function.
For example
 |  for i in range(51):
 |	if pvnames[i] == 'xkSun:test50Scalar:aiExample1':
 |          globals()['pv' + str(i)] = pv_monitor(pvnames[i])
 |          globals()['pv' + str(i)].my_monitor()
 |  def my_monitor(self):
 |     ctxt.monitor(self.pv, self.onChanges)

-------------------------------------------------------------------------------------------------------------------------------------------------------
Subject:Re: How can I use pvapy or p4p to monitor multiple PVS
From:Marty Kraimer via Tech-talk <tech-talk at aps.anl.gov>
To:tech-talk at aps.anl.gov
Date:Tue, 13 Oct 2020 06:06:15 -0400
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
-------------------------------------------------------------------------------------------------------------------------------------------------------
Subject:Re: How can I use pvapy or p4p to monitor multiple PVS
From:Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To:"qt980319 at mail.ustc.edu.cn" <qt980319 at mail.ustc.edu.cn>
Cc:"sunxk at ustc.edu.cn" <sunxk at ustc.edu.cn>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date:Tue, 13 Oct 2020 03:54:32 +0000
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

Replies:
Re: How can I use pvapy or p4p to monitor multiple PVS Veseli, Sinisa via Tech-talk

Navigate by Date:
Prev: RE: EPICS timestamp in the archiver appliance Abdalla Ahmad via Tech-talk
Next: Re: EPICS timestamp in the archiver appliance Shankar, Murali 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How can I use pvapy or p4p to monitor multiple PVS Michael Davidsaver via Tech-talk
Next: Re: How can I use pvapy or p4p to monitor multiple PVS Veseli, Sinisa 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  <20202021  2022  2023  2024 
ANJ, 13 Oct 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·