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  2025  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  2025 
<== Date ==> <== Thread ==>

Subject: Re: [EXTERNAL] Phoebus - image on Boolean-Button
From: "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov>
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>, Mogamad Amien Crombie <ma.crombie at ilabs.nrf.ac.za>
Date: Wed, 26 Jan 2022 15:03:54 +0000
You're correct, it doesn't support runtime changes of the images.

Thanks,
Kay

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mogamad Amien Crombie via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, January 26, 2022 9:00 AM
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Phoebus - image on Boolean-Button
 

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 Mogamad Amien Crombie via Tech-talk
References:
Phoebus - image on Boolean-Button Mogamad Amien Crombie via Tech-talk

Navigate by Date:
Prev: Re: Use of asyn's setInterruptUInt32Digital in EPICS device support Mark Rivers via Tech-talk
Next: Re: ADVimba memory leak ? John Dobbins 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  2025 
Navigate by Thread:
Prev: Phoebus - image on Boolean-Button Mogamad Amien Crombie via Tech-talk
Next: Re: [EXTERNAL] Phoebus - image on Boolean-Button Mogamad Amien Crombie 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  2025 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·