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: Re: CSS: Can not access PVs in python script
From: "Kasemir, Kay" <[email protected]>
To: Sahil <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 19 Aug 2013 09:15:10 -0400
Look at the CSS online help, "CSS Applications", "Display", ".. BOY", "Script".
It who's how "Input PVs" are assigned to scripts.
And look at the script related BOY examples.

Thanks,
Kay

On Aug 19, 2013, at 8:56 AM, Sahil <[email protected]<mailto:[email protected]>> wrote:

I had been going through the help of CSS but I can not find how to assign i.e.

pv[0] = readvoltage

if this type of assignment is invaled then alternatively how can I find which PV (e.g readvoltage)  correspondes to which pv[ ]?
Is there any table/file that contains these assignment ?

Looking forward for the solution.

Thank you.


On Mon, Aug 19, 2013 at 3:39 PM, Kasemir, Kay <[email protected]<mailto:[email protected]>> wrote:
Hi:

The parameter to PVUtil.getDouble(pv) must be one of the PVs that's an input to the script.
CSS BOY calls your script after handling the PV connections, asserting that the PVs have values, and then you can use this:

# pvs[] are the input PVs to the script.
# Assume pvs[0] is the 'voltage' PV:
voltage = PVUtil.getDouble(pvs[0])

Read the online help, look at one of the BOY Examples that are included with CSS.

Thanks,
Kay


On Aug 17, 2013, at 5:25 PM, sahil jee <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote:

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: CSS: Can not access PVs in python script Kasemir, Kay
Re: CSS: Can not access PVs in python script Sahil

Navigate by Date:
Prev: Re: CSS: Can not access PVs in python script Sahil
Next: Response Time Yasemin Barutçu
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: CSS: Can not access PVs in python script Sahil
Next: Response Time Yasemin Barutçu
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 ·