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

Subject: Fwd: Can not access PVs in python script
From: sahil jee <[email protected]>
To: "Mooney, Tim M." <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 19 Aug 2013 01:20:28 +0300
Dear Mooney

Thank you for your reply.

Fortunately, The previous error (i.e. "readvoltage" not defined?) has gone but I am getting another error now.
As highlighted in the following.

My code is as follows.

###########################################################
from org.csstudio.opibuilder.
scriptUtil import PVUtil

value1 = PVUtil.getDouble("readvoltage"
)
....
.....
 
TypeError: getDouble(): 1st arg can't be coerced to org.csstudio.utility.pv.PV

I put the PV in inverted commas as mentioned by you, which has eleminated the previous error
but now it gives me the above error.

Should I include some extra libraries etc ??


Looking forward for the solution.

Thank you.

On Sun, Aug 18, 2013 at 6:01 PM, Mooney, Tim M. <[email protected]> wrote:
See if
PVUtil.getDouble("readvoltage")
works.

Tim

From: [email protected] [[email protected]] on behalf of sahil jee [[email protected]]
Sent: Saturday, August 17, 2013 4:25 PM
To: [email protected]
Subject: CSS: Can not access PVs in python script

Dear community

I am trying to acess PVs of my ioc. My ioc(stream device) is running properly and containing "readvoltage" and "readcurrent", "calculatedpower" as PVs.

In my CSS application, I want to access the above two mentioned PVs in order to make some calculations.

I am trying python embedded script as follows;

voltage = PVUtil.getDouble(readvoltage)    # readvoltage and readcurrent are PVs in my ioc
current=PVUtil.getDouble(readcurrent)
power = valtage*current

calculatedpower.setValue(power)     # calculatedpower is a PV in my ioc

When I run my opi it gives me the error;

"readvoltage" not defined?

In my opi, I have two text input widget which are receiving readvoltage PV value and readcurrent PV value, and one Text Update widget which will receive the calculatedpower PV value.

Looking for your kind reply.

Thank you all.







References:
CSS: Can not access PVs in python script sahil jee
RE: Can not access PVs in python script Mooney, Tim M.
Re: Can not access PVs in python script sahil jee

Navigate by Date:
Prev: Re: Can not access PVs in python script sahil jee
Next: Re: CSS: Can not access PVs in python script Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Can not access PVs in python script sahil jee
Next: Re: CSS: Can not access PVs in python script Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·