Experimental Physics and Industrial Control System
|
Hi Kay
According to 'cainfo' my pv is a DBF_DOUBLE and request is
DBR_DOUBLE
But I do not know how to check for output with the 'print'
statement..I'm using Mint 18 and CSS is started without a terminal
command (am I doing something wrong?)
I do have a 'console' output but that just list dozens of
'Warnings' all over.
I would love to have some way to debug CSS as otherwise its like
shooting in the dark.
Amien
On 24/08/2017 14:56, Kasemir, Kay
wrote:
Hi:
What's the data type of the PV?
To debug, try adding
print(str(pv.read()))
and then check in the terminal where you started CSS for the
output.
-Kay
Hi
My code :
1. from
org.csstudio.display.builder.runtime.script import
PVUtil, ScriptUtil
2. from
org.csstudio.display.builder.model.properties import
WidgetColor
3. ss =
ScriptUtil.findWidgetByName(widget, "ss_range")
4. sx =
ScriptUtil.findWidgetByName(widget, "rangeX")
5. pv = ScriptUtil.getPrimaryPV(sx)
6. pval = PVUtil.getDouble(pv)
7. ss.setPropertyValue("text", str(pv) + " : " + str(pval)) ##
## 'pv' returns the right pv
attached to my 'spinner'. This
pv is passed via the script as '$(pv_name)'
## pval returns 'nan'
although my 'spinner' displays the value (1 to 6)
depending my last selected value
Thanks
Amien
|
- Replies:
- Re: CSS-4.5 : Display-Builder : getting widget's PV value Kasemir, Kay
- References:
- CSS-4.5 : Display-Builder : getting widget's PV value Amien Crombie
- Re: CSS-4.5 : Display-Builder : getting widget's PV value Kasemir, Kay
- Navigate by Date:
- Prev:
Re: CSS-4.5 : Display-Builder : getting widget's PV value Kasemir, Kay
- Next:
Re: CSS-4.5 : Display-Builder : getting widget's PV value 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
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: CSS-4.5 : Display-Builder : getting widget's PV value Kasemir, Kay
- Next:
Re: CSS-4.5 : Display-Builder : getting widget's PV value 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
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 21 Dec 2017 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|