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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Phoebus - image on Boolean-Button
From: Mogamad Amien Crombie via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Date: Wed, 26 Jan 2022 16:00:07 +0200

Hi there.

I switched to Phoebus about 6 months ago and everything so far is working except 1 problem.

I have a 'boolean-button' with a 'on_image' that needs to change to 1 of 3 images I have.

Now when I 'run' my display, I get the default image and I need to click on the 'boolean-button' again to show the right image.


Here is my external script:

from org.csstudio.display.builder.runtime.script import PVUtil
from java import lang
a = PVUtil.getDouble(pvs[0])
s = PVUtil.getDouble(pvs[1])
## Script Body
if s==0.0:
widget.setPropertyValue('on_image', "fcup_red.png")
widget.setPropertyValue('off_image', "fcup_red.png")
elif s==64.0 or s==128.0:
widget.setPropertyValue('y', 45)
widget.setPropertyValue('on_image', "fcup.png")
widget.setPropertyValue('off_image', "fcup.png")
elif s>64.0 and s<128.0:
widget.setPropertyValue('y', 45)
widget.setPropertyValue('on_image', "fcup_red.png")
widget.setPropertyValue('off_image', "fcup_red.png")
elif s>128:
widget.setPropertyValue('on_image', "fcup_pink.png")
widget.setPropertyValue('off_image', "fcup_pink.png")
else:
widget.setPropertyValue('on_image', "fcup.png")
widget.setPropertyValue('off_image', "fcup.png")
#print ("######## Done ############")


Thanks

Amien

iThemba-LABS :

South Africa





Replies:
Re: [EXTERNAL] Phoebus - image on Boolean-Button Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: Use of asyn's setInterruptUInt32Digital in EPICS device support Jure Varlec via Tech-talk
Next: Re: Use of asyn's setInterruptUInt32Digital in EPICS device support Mark Rivers 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  <20222023  2024 
Navigate by Thread:
Prev: Re: Use of asyn's setInterruptUInt32Digital in EPICS device support Jure Varlec via Tech-talk
Next: Re: [EXTERNAL] Phoebus - image on Boolean-Button 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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·