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  2009  2010  2011  2012  2013  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: CSS/BOY: how to force a Scaled Slider to rescale when the PV rescales
From: Peter Milne <[email protected]>
To: "Pearson, Matthew R." <[email protected]>
Cc: Tech-talk <[email protected]>
Date: Tue, 25 Nov 2014 21:19:05 +0000
Hi Matt

Thank you very much for your suggestion - it works really well!

Cheers

Peter

On 24/11/14 15:18, Pearson, Matthew R. wrote:
Hi Peter,

A rule (or a few rules) attached to the Scaled Slider might do the job. The rule can monitor the mbbo record fields and set the appropriate fields in the widget (Maxumum, Minimum, High, etc.). I use rules for similar jobs, mainly for the cases where widgets don't provide a PV monitor option (like the Intensity Widget X/Y sizes).

Cheers,
Matt


On Nov 22, 2014, at 1:32 PM, Peter Milne <[email protected]> wrote:

Hello Tech-talk

Developing an OPI for a multi channel DAC output device in DC mode (D-TACQ AO420FMC-4/ACQ424-32):

In the IOC:
- there's an AO record for each channel
- each channel has a gain control, so that the output range changes, from, say +/-5V to +/-10V, this is represented by an MBBO record.
- a short bit of SNL monitors the gain change and changes the AO record limits (HOPR, LOPR, ESLO) so that the PV is rescaled on the fly.
.. This works very well.

In the CSS/BOY OPI there's a Scaled Slider to control each AO. There's a menu button to set the gain for each channel. However, when the gain is changed, the Slider does not rescale automatically.

That's understandable, it's probably unreasonable to expect the widget to monitor _all_ the fields in the PV. On a Linux desktop, F5 "Refresh OPI" causes the widget to update and the scale changes correctly.

Q1: I'd like to hook a javascript to the gain menu button to call "Refresh OPI" so that the slider rescales automatically. It's not obvious how to do this. If javascript can't call the refresh method, perhaps it could even post <keypress F5> into the event queue.. Does anyone have an example?

There's another problem. I'm told that on a Windows desktop, "Refresh OPI" (either F5 or right-click menu) does _not_ cause the widget to update. However, closing and reopening the OPI does.

Q2: would it be possible to script a close/reopen of an opi (to come back in the same place) ?

.. In both cases, I've experimented with a few script options, but can't find the right method to call.

Thanks

--
Peter Milne
Director of Sales
www.d-tacq.com



--
Peter Milne
Director of Sales
www.d-tacq.com


References:
CSS/BOY: how to force a Scaled Slider to rescale when the PV rescales Peter Milne
Re: CSS/BOY: how to force a Scaled Slider to rescale when the PV rescales Pearson, Matthew R.

Navigate by Date:
Prev: RE: MBBI Value Type Mark Rivers
Next: RE: streamDevice output format question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: CSS/BOY: how to force a Scaled Slider to rescale when the PV rescales Pearson, Matthew R.
Next: Job Opening Ronald Ruth
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·