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

Subject: Re: Lookup table problem
From: Ben Franksen <[email protected]>
To: [email protected]
Date: Fri, 22 Oct 2010 03:25:41 +0200
On Donnerstag, 21. Oktober 2010, Ralph Lange wrote:
>   On 21.10.2010 11:21, Steven M. Hartman wrote:
> > The ai and ao records included in base support a breakpoint table
> > facility which may be adequate for your needs. But this conversion
> > is to/from RVAL (which is an int) and VAL (which is a double). I
> > hacked a bpt record (based on the ai record) which used the break
> > point table functions included in base to do double to double
> > conversions for my needs. In this way, everything was done in the
> > EPICS database (no sequencer, no subroutine records, etc).
>
> RVALs are integer, of course - now I start remembering .... stupid
> me.
>
> For a similar application (global tune feed-forward from all ID gaps
> towards multiple families of quadrupoles) Benjamin Franksen at BESSY
> created a new record called cvtRecord to handle large 1/2D
> feed-forward tables in a generic way:

Yes. I use this record type heavily for all sorts of conversion tasks. 
It is one of the most-reused pieces of code I have ever written.

The cvt record is a lot more flexible than ao. As Ralph indicated, it is 
not restricted to functions of one input variable, but can also read 
and interpolate two-dimensional tables, i.e. calculate the output from 
from two independent inputs. Furthermore, it can load / reload tables 
at runtime. The actual loading of the table is done asynchronously and 
proceeds in parallel to the conversion, i.e. conversion continues to 
run while the table is loaded in the background. Only after the table 
has successfully been loaded is it swapped in for the old one. This 
means you can correct or adjust tables in a running system w/o having 
to stop the feedforward.

I should properly publish this code on our newly revamped website. I 
will post an announcement here as soon as I have the page up and 
running.

BTW, the csm module that implements the loading and interpolation was 
written by my colleague GÃtz Pfeiffer.

Cheers
Ben
-- 
"Never confuse what is natural with what is habitual."
                                   -- attributed to Mahatma Gandhi


References:
Lookup table problem Silver
Re: Lookup table problem Steven M. Hartman
Re: Lookup table problem Ralph Lange

Navigate by Date:
Prev: Re: MEDM btn3 mouse/X11 problems on GNOME x64 (Ubuntu 10.04) Matthieu Bec
Next: Re: MEDM btn3 mouse/X11 problems on GNOME x64 (Ubuntu 10.04) Angus Gratton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Lookup table problem Ralph Lange
Next: Re: Lookup table problem Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Oct 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·