There is a partial workaround, but not a pretty one. Place
a menu mux widget on the affected screen, and connect it's PV name to the .PREC
field of the affected record. Now change it's co-ordinates so it's off screen.
When the .PREC field changes, the menu mux will force a refresh of the screen,
and the PV should display with the correct precision. Unfortunately this only
works if the affected PV is only displayed on a single screen, because of the
issue mentioned below.
Many thanks,
Tom Cobb, Diamond Light Source
Ltd. Diamond House Harwell Science and Innovation
Campus Didcot Oxfordshire OX11 0DE United Kingdom Tel +44 (0)
1235 778582
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] |
+-----------------------------------------+ 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
Scanned by iCritical.
|
- References:
- EDM dynamic precision update, help Mathew James Hicks
- Re: EDM dynamic precision update, help Andrew Johnson
- Re: EDM dynamic precision update, help Rolf Keitel
- Navigate by Date:
- Prev:
Re: EDM dynamic precision update, help Rolf Keitel
- Next:
New Software Engineer Position at NSCL Eric Berryman
- 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
- Navigate by Thread:
- Prev:
Re: EDM dynamic precision update, help Rolf Keitel
- Next:
Variable size frame Bruno Coudoin
- 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
|