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: Ralph Lange <[email protected]>
To: tech-talk <[email protected]>
Date: Thu, 21 Oct 2010 12:07:04 -0400
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:


/*
* General Remarks
* ===============
*
* This record type supports conversion of one or two floating point values
* into one resulting floating point value. The field METH specifies the kind
* of conversion: LINEAR, via a custom SUBROUTINE, or via one- (1D) or
* two-dimensional (2D) conversion TABLE. More specifically, if METH is
*
* menuCvtMethodLinear:
* VAL = XSLO * X + YSLO * Y + VOFF
*
* menuCvtMethodSubroutine:
* SPEC should be the name of a global subroutine. CSUB is set to the
* address of the subroutine.
* VAL = CSUB(X, Y, &DPVT)
*
* menuCvtMethod1DTable:
* menuCvtMethod1DTableInverted:
* menuCvtMethod2DTable:
* Conversion uses the csm module. SPEC should be the filename
* of the table. CSUB is set to the csm_function handle returned by csm.
* VAL = csm_y(CSUB, X) for one-dimensional tables
* VAL = csm_x(CSUB, Y) for one-dimensional inverted tables
* VAL = csm_z(CSUB, X, Y) two-dimensional tables
*/



You should probably ask [email protected] for the details and the code to this record (and the "csm" module it uses) if you are interested.


~Ralph


Replies:
Re: Lookup table problem Ben Franksen
References:
Lookup table problem Silver
Re: Lookup table problem Steven M. Hartman

Navigate by Date:
Prev: cross-gcc-2.9.6 problem 王林
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 
Navigate by Thread:
Prev: Re: Lookup table problem Steven M. Hartman
Next: Re: Lookup table problem Ben Franksen
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 ·