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  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: Re: 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: "Kasemir, Kay" <kasemirk at ornl.gov>, "tech-talk at aps.anl.gov" <Tech-talk at aps.anl.gov>
Date: Mon, 11 Sep 2023 23:27:35 +0000
Hi kay,

Thanks for your reply.
I have two questions to consult you:

I didn't see any warning or error messages by display builder if the displays misused Text Update widgets as labels by leaving the pv_name empty. How to turn on the function for phoebus.

I intend to display "ok" or pv1 value according to different pv0 value conditions in text update widget, for example:

if pv0 is zero then text update widget displays the pv1 value.
if pv0 is not zero then text update widget displays "ok".

Is it possible to write scripts by using text update widget for phoebus and could you please help me how to do this for phoebus or for ioc side. 
Thank you very much again.



From: Kasemir, Kay <kasemirk at ornl.gov>
Sent: 11 September 2023 12:44
To: neu lzf <lzfneu at live.com>; tech-talk at aps.anl.gov <Tech-talk at aps.anl.gov>
Subject: Re: Question about text update widget is not updating text problem for phoebus
 

See https://github.com/ControlSystemStudio/phoebus/wiki/Display-Builder-Compatibility#text-update:

“Some BOY displays misused Text Update widgets as labels by leaving the pv_name empty and instead directly configuring the text.”

 

If you want to display the value of a PV, use a text update widget and configure it’s PV name.

If you have a number but want to display that as a label, add suitable mbbi records to the IOC to convert the states into lables, and then you’re back to simply displaying that PV in a text update widget.

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of neu lzf via Tech-talk <Tech-talk at aps.anl.gov>
Date: Monday, September 11, 2023 at 8:36 AM
To: tech-talk at aps.anl.gov <Tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Question about text update widget is not updating text problem for phoebus

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.

 

 

 


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

Navigate by Date:
Prev: RE: PyDevice device module compile error with linux-arm Pearson, Matthew via Tech-talk
Next: RE: PyDevice device module compile error with linux-arm Ha, Kiman 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: Question about text update widget is not updating text problem for phoebus Kasemir, Kay via Tech-talk
Next: scalcout and calc yielding different results Marco A. Barra Montevechi Filho 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 
ANJ, 12 Sep 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·