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: Andrew Johnson <[email protected]>
To: [email protected]
Date: Tue, 3 Mar 2009 17:20:31 -0600
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
-- 
The best FOSS code is written to be read by other humans -- Harold Welte

Replies:
Re: EDM dynamic precision update, help Rolf Keitel
References:
EDM dynamic precision update, help Mathew James Hicks

Navigate by Date:
Prev: Variable size frame Bruno Coudoin
Next: Re: EDM dynamic precision update, help Rolf Keitel
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: EDM dynamic precision update, help Mathew James Hicks
Next: Re: EDM dynamic precision update, help Rolf Keitel
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 ·