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  <20162017  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: CSS Boy Write PVs to file
From: "Konrad, Martin" <[email protected]>
To: Iain Marcuson <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 21 Sep 2016 22:50:29 +0000
Hi Iain,
> I wish to save some Process Variables to a CSV file, but I
> cannot figure out the code to retrieve the values from the PVs into
> Python.
I think the problem here is that createPV doesn't create the PV
immediately. It takes some time to happen (I guess due to inter-thread
synchronization in CS-Studio). My understanding of the documentation is
that the actual create happens at a rate of 50 Hz (queue run or
something similar in the receiving thread). This means waiting a little
should fix your problem:

pv = PVUtil.createPV(widget.getPV)
time.sleep(0.1)
value = PVUtil.getDouble(pv)

HTH,

Martin

-- 
Martin Konrad
Control System Engineer
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]


Replies:
Re: CSS Boy Write PVs to file Kasemir, Kay

Navigate by Date:
Prev: CSS Boy Write PVs to file Iain Marcuson
Next: Re: module for Keithley 6485 PA-meter Christoph Schroeder
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: CSS Boy Write PVs to file Iain Marcuson
Next: Re: CSS Boy Write PVs to file Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 22 Sep 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·