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] |
+-----------------------------------------+
|