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: Question about Edm dynamic display zone's fill color according to PVs
From: <Linda.Pratt@diamond.ac.uk>
To: <tech-talk@aps.anl.gov>
Date: Fri, 19 May 2017 09:34:50 +0000

Zhefu,

 

I suggest you consider introducing a fourth PV, PVd say, for the status to do the logic behind your meaningful colours (you still need the static definitions).

 

For example, if the three PVs were valve open/shut states on a Beamline End Station and the colours represented combinations of whether the system is ready to start a pump, move a motor, etc., having the logic buried in the GUI calc definition might make it a bit mysterious.  If you implement PVd its value will be available to other EPICS calculations, other GUIs, the archiver, the alarm handler, etc. 

 

You could also add an EDM symbol widget using PVd referring to an EDM symbol file with different coloured widgets in it instead or as well.

 

Furthermore consider whether a fifth PV is needed because the “blittering” between the red green and yellow colours you list suggests to me you have two statuses which might be better with their own separate widgets.  Alternatively, because the values are all zero or 1, you could make each bit in PVd a status flag use an EDM byte widget with number of bits property set to 2 to display them.  Each bit has the same on/off colour properties though, which may or may not be acceptable.

 

Linda

 

From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Rolf Keitel
Sent: 09 May 2017 17:54
To: lzf neu; tech_talk
Subject: Re: Question about Edm dynamic display zone's fill color according to PVs

 

Hi Zhefu,

 

--- in the edmobjects directory in the colors.list file you need to define static colors (I just chose the indices 0,1,2,3,...):

static 0 blue { 0 0 65535 }

static 1 green-yellow { 0 65535 0 65535 65535 0 }

static 2 green-red { 0 65535 0 65535 0 0 }

rule 3 zone-fill {

 = 1 : blue

 = 2 : green-yellow

 = 3 : green-red

 default: blue

}

 

---  in the edmobjects directory in the calc.list file you need to define a calculated color:

zone-fill

A=1&&B=1?2:(A=0&&B=1&&C=1?3:1)

 

--- in your edm widget, e.g. a rectangle

set the fill-color to

zone-fill

set the Color PV to

CALC\zone-fill(PVa,PVb,PVc)

 

- rolf -

On 05/09/17 03:32, lzf neu wrote:

Hi,

I want to display the zone's fill color according to PVs.

In my case, rectangle zone's fill color depend on three PVs.

Let's assume PVa, PVb and PVc.

If PVc is equal to zero, then the rectangle's fill color is blue.

If PVa and PVb are both equal to 1, the rectangle zone's fill color is green and yellow blittering alternatively.

if PVa is 0 and PVb and PVc are both 1, then the zone's fill color is green and red blittering alternatively.

I have no idea how to do this by using edm, any help will be appreciated and thanks in advance.

Zhefu

 

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


Navigate by Date:
Prev: Re: string fanout or stringout after conditional check? Eric Norum
Next: AreaDetector ImageJ viewer problem Vigder, Mark
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: Micronix MMC-10 Kevin Peterson
Next: AreaDetector ImageJ viewer problem Vigder, Mark
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, 19 May 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·