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

Subject: Re: CSS binary color text
From: Luca Cavalli <LCavalli@cgspace.it>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Fri, 21 Apr 2017 09:06:50 +0000
Hi,

a solution implemented inside CSS would be the best option, in the meantime you
can use a Text Update with transparent background, plus a little script to be
executed as action hooking the mouse click to the script execution.


from org.csstudio.opibuilder.scriptUtil import PVUtil
status = PVUtil.getLong(widget.getPV())
if status == 0:
        widget.getPV().setValue(1)
else:
        widget.getPV().setValue(0)


Cheers,

Luca

On Fri, 2017-04-21 at 08:11 +0000, Southern, Tim wrote:
> Hi Miguel,
>
> You can change the value of almost any attribute of a CSS widget. There are
> predefined attributes listed in the Rules property that can change the
> behavior of a widget based on the value of a PV. The screen shot below shows
> how to define a foreground color rule based off a PV to be green when value is
> 1, else turn red.
>
>
>
>
> There appears to be no easy way to set the Off/On Label properties from the DB
> records ZNAM/ONAM fields. In (edm), there is a Label property that allows one
> to set the label value to (PV State or Literal).  I made a request on github
> for this option in BOY.  https://github.com/ControlSystemStudio/cs-studio/issu
> es/2189
>
> Cheers,
> -Tim Southern
> southerntb@ornl.gov
>
>
>
>
>
> From: <tech-talk-bounces@aps.anl.gov> on behalf of Miguel <miguel.b.fernandes@
> gmail.com>
> Date: Thursday, April 20, 2017 at 10:44 AM
> To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
> Subject: Re: Fwd: CSS binary color text
>
> I also need to click over it to change the state.
> The only way i have so far is in fact to use the Image boolean button. I set
> the one severity field (OSV) to major .Then set in CSS the foreground to green
> and checked the ForeColor Alarm Sensitive to yes.
> But I am still not able to automatically use the ONAME and ZNAME fields in CSS
> so I have to manually set the ON and OFF label.
>
> Thanks
>
> On 18-04-2017 11:35, Luca Cavalli wrote:
> Hi Miguel,
>
> if you need to display only a text label you can use a Text Update widget with
> the transparent flag set, plus (as already suggested) a rule to change
> foreground color upon PV value.
>
> Cheers,
>
> Luca
>
>
> On Fri, 2017-04-14 at 19:15 +0100, Miguel wrote:
> Hello,
> I would like to do two things with my bo records in CSS.
>
> 1. Have a text that is according to the ONAM and ZNAM pv fields.
>
> 2. That this text is green in case of on and red othwerwise
>
>
> I only manage to do something similiat with an image boolean button
> (with no image and ON OFF predefined text)
>
> Thanks
>


________________________________

<< Le informazioni contenute in questo messaggio di posta elettronica e relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a darcene gentile comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>

<< This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence. Thank you for your co-operation. Please contact our IT Helpdesk on +3902380481 or email it@cgspace.it if you need assistance >>


References:
Re: CSS binary color text Southern, Tim

Navigate by Date:
Prev: Re: CSS binary color text Southern, Tim
Next: Re: CSS binary color text Miguel
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
Navigate by Thread:
Prev: Re: CSS binary color text Southern, Tim
Next: Re: CSS binary color text Miguel
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
ANJ, 21 Apr 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·