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  <20092010  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EDM dynamic precision update, help
From: Rolf Keitel <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: [email protected]
Date: Tue, 03 Mar 2009 19:37:51 -0800
The only other way I know of is to close   a l l  edm display pages, which display this record, and then reopen. With earlier display mangers like dm, it was sufficient to close and reopen the page you are looking at, because they refreshed the channel attributes on page start. edm uses the PV factory, which only refreshes attributes once all references to a PV are gone. John Sinclair may correct me on this.

- rolf -

Andrew Johnson wrote:
Hi Mathew,

On Tuesday 03 March 2009 14:38:45 Mathew James Hicks wrote:
  
I have a database running on an IOC running an ai record named
'$(SubSys):$(Device):Read'. I display the value in the record using EDM
with the Text Monitor widget (I have tried other widgets but they all have
the same issue.) The precision is set to get the precision from the
database, which it does.

In the database I have ao records that push different precision values into
$(SubSys):$(Device):Read.PREC dynamically. I have checked and the values
are indeed being placed into the PREC field correctly.

The problem is EDM doesn't redraw the widget to incorporate the changed
PREC values. I tried putting Text Monitor widget on a different screen,
opened by a related display button, but even when the new window is opened;
it doesn't redraw the Text Monitor with the new precision (VAL is updated
correctly.) If I close EDM completely and restart it, the new precision
values are reflected correctly. This leads me to believe that EDM assumes
PREC fields to be constant upon initialization, is this correct? If so, is
there any way to change this?
    
The IOC doesn't generate a monitor event when a channel attribute such as its 
precision changes, unless the value changes at the same time or soon after, 
so there's no way for EDM to know when the precision has been modified if you 
change it dynamically.  This has generally resulted in EPICS display managers 
getting all the attributes they need at connection time and then just using a 
basic value type (e.g. DBR_DOUBLE) for the monitor events.  They could use an 
extended type (DBR_GR_DOUBLE) and would then receive updates for the channel 
attributes whenever the value changes, but doing that is not very efficient, 
since a struct dbr_gr_double is about 100 bytes long compared to the 8 bytes 
of a double value.

If you ask your display widget to fetch the value as a text string (some 
widgets can do this, although not necessarily all) it would at least use the 
value of PREC at the time that a value update happens since the string 
conversion happens on the IOC, although if PREC changes without the value 
changing then the display would still not update to reflect that.

Another possibility if you /really/ need this to work might be to create a 
series of widgets, one for each value of PREC you expect, and have them 
conditionally displayed depending on the value of the .PREC field of the 
record (or whatever other record is calculating the precision you want).

HTH,

- Andrew
  


-- 
+-----------------------------------------+
| Rolf Keitel, Ph.D., TRIUMF              |
| Division Head, Engineering              |
| Tel: (604) 222-7453 Fax: (604)222-7307  |
| e-mail: [email protected]                  |
+-----------------------------------------+

Replies:
RE: EDM dynamic precision update, help Cobb, TM (Tom)
References:
EDM dynamic precision update, help Mathew James Hicks
Re: EDM dynamic precision update, help Andrew Johnson

Navigate by Date:
Prev: Re: EDM dynamic precision update, help Andrew Johnson
Next: RE: EDM dynamic precision update, help Cobb, TM (Tom)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EDM dynamic precision update, help Andrew Johnson
Next: RE: EDM dynamic precision update, help Cobb, TM (Tom)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·