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 2023 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 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Question about Edm dynamic display zone's fill color according to PVs |
From: | <[email protected]> |
To: | <[email protected]> |
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:
[email protected] [mailto:[email protected]]
On Behalf Of Rolf Keitel 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:
-- 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. |