Assuming a script with PVs loc://value and the_real_pv:
importPackage(Packages.org.csstudio.opibuilder.scriptUtil);
pvs[0].setValue(PVUtil.getDouble(pvs[1]))
Read the online help for more details of scripts, PVUtil.getDouble etc.
-Kay
From: Pavel Masloff <[email protected]>
To: Kasemir Kay <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [CSS] text edit + Go! button
What about the second option?
How will the script look like?
On Wed, Jun 6, 2012 at 4:20 PM, Kasemir, Kay
<[email protected]> wrote:
You could
1) Have the text entry widget write to a PV on the IOC that does nothing,
then have the 'Go' button write to another PV's PROC field, that that
other PV could be an AO record
with DOL = first PV, OUT = final PV.
So pushing the button will actually cause the value from the text to be
written to the final PV.
Can have any number of FLNKs to trigger a whole lot of stuff, and this
would work with EDM, CSS BOY, ...
2) Have the text entry field write to a loc://.. local PV, have the button
run a script that reads from the loc://.. PV and writes to the real PV.
This will only work in CSS BOY, but is much simpler and doesn't require
anything special on the IOC.
-Kay
From: Pavel Masloff
<[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: [CSS] text edit + Go! button
Is there a way in CSS using whatever, but scripts create a text edit
widget and a Go! button, so you first fill in the PV value (nothing
happens), and once you click on the button it writes the text you typed in
one (or a few) records (PVs)?
--
Best regards,
Pavel Maslov, MS
Controls Engineer at Pulsed power Lab
Efremov Institute for Electro-Physical Apparatus
St. Petersburg, Russia
Mobile: +7 (951) 672 22 19
Landline: +7 (812) 461 01 01
--
Best regards,
Pavel Maslov, MS
Controls Engineer at Pulsed power Lab
Efremov Institute for Electro-Physical Apparatus
St. Petersburg, Russia
Mobile: +7 (951) 672 22 19
Landline: +7 (812) 461 01 01
- Replies:
- Re: [CSS] text edit + Go! button Pavel Masloff
- References:
- Re: [CSS] text edit + Go! button Pavel Masloff
- Navigate by Date:
- Prev:
Re: [CSS] text edit + Go! button Pavel Masloff
- Next:
Re: mask for bitwise operation in CALC record Andrew Johnson
- 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
- Navigate by Thread:
- Prev:
Re: [CSS] text edit + Go! button Pavel Masloff
- Next:
Re: [CSS] text edit + Go! button Pavel Masloff
- 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
|