Experimental Physics and
| |||||||||||||||
|
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
| ||||||||||||||
ANJ, 21 Oct 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |