EPICS Home

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  2016  2017  2018  2019  2020  2021  2022  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Question about text update widget is not updating text problem for phoebus
From: neu lzf via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <Tech-talk at aps.anl.gov>
Date: Mon, 11 Sep 2023 12:35:47 +0000
Hi all,

I use binary SNS version of Phoebus and have two questions to consult you:

1)  ​I want to display "OK" text in Text Update Widget according to pv1 value if it is not equal to zero. I write embedded python script for phoebus as follows:

# Embedded python Script
from org.csstudio.opibuilder.scriptUtil import PVUtil
pv0=PVUtil.getDouble(pvs[0])
pv1=PVUtil.getDouble(pvs[1])
if (pv1!=0):
     widget.setPropertyValue("text","OK")
else:                 
  widget.setPropertyValue("text",str(format(pv0,".3f")))

the above script works well for CSS, while for phoebus it doesn't update text content to "OK" if pv1 is not equal to zero.  I have no idea what the problem of the script is.

2)  The script for phoebus doesn't show any error message if there is a syntax error in it, I wonder if I miss configuration to turn this function on and where to turn this function on.

Any help will be appreciated and thank you very much in advance.




Replies:
Re: Question about text update widget is not updating text problem for phoebus Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: RE: Build system question Mark Rivers via Tech-talk
Next: Re: Question about text update widget is not updating text problem for phoebus Kasemir, Kay via Tech-talk
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  <20232024 
Navigate by Thread:
Prev: RE: Build system question Mark Rivers via Tech-talk
Next: Re: Question about text update widget is not updating text problem for phoebus Kasemir, Kay via Tech-talk
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  <20232024