This interpolation software relies on the aSub record. InterpNew is better. The following fields of the aSub record have the following functions in this software: VALA[] independent variable VALB[] dependent variable 1 VALC[] dependent variable 2 A new value of independent variable, for interp or adding entry VALN number of entries F interpolation order (1: linear; >1: polynomial) G mode (0: Interpolate; 1: Add Entry; 2: Clear All) B new value for dependent variable 1 array (used if mode is "Add Entry") C new value for dependent variable 2 array (used if mode is "Add Entry") VALE successful interpolation (VALE==1) VALF interpolation result for dependent variable 1 VALG interpolation result for dependent variable 2 NOVA max number of entries in a array - limits table size NOVB max number of entries in b array - limits table size NOVC max number of entries in c array - limits table size Note: the code uses only n entries, where n = MIN(nova, novb, novc) Here's how you use it: Load VALA, VALB, VALC arrays such that VALB[i] = y1(VALA[i]) and VALC[i] = y2(VALA[i]), where y1 and y2 are the functions you want to interpolate, and VALA]] increases with its array index. You can do this in several ways: 1) with a channel-access client, such as BURT or caput. This works only at run time. 2) by editing the file autosave writes when it's told to save according to 'interp.req' (later renamed 'interp_settings.req'), and then using autosave/restore to load that file. This works only at boot time. 3) by setting the interp mode to "Add Entry", specifying interp_y1 and interp_y2 values, and then specifying an interp_x value. This works only at run time. However you load the arrays, make sure you do all of the following: 1) set VALE to the number of meaningful points in the VALA, VALB, VALC arrays. 2) load arrays into VALA, VALB, and VALC 3) Make sure VALA[] is monotonically increasing with its array index The supplied database adds a sort of user interface to the software described above. The user writes to $(P)interp_x, and the database sends this value to the aSub record, which interpolates and, if successful, writes to $(P)interp_y1 and $(P)interp_y2. If the user has specified output-link fields $(P)interp_y1.OUT or $(P)interp_y2.OUT, then the new values will be written to the PV's named in those links. ============================================================================== To use BURT to load and save the VALA, VALB, and VALC arrays, make a burt request file for your loaded copy of the interp database: ---begin file interp.req--- xxx:interp.VALA xxx:interp.VALB xxx:interp.VALC ---end file interp.req--- Then make a load file using burtrb: burtrb -f interp.req -o interp.load This will produce an output file that might look something like this: ---begin file interp.load--- --- Start BURT header Time: Thu Dec 9 17:17:48 2010 Login ID: mooney (Tim Mooney) Eff UID: 597 Group ID: 104 Keywords: Comments: Type: Absolute Directory /home/oxygen4/MOONEY/epics/synApps/support/xxx/xxxApp/op/burt Req File: interp.req --- End BURT header xxx:interp.VALA 2000 0.000000000000000e+00 0.000000000000000e+00 ... xxx:interp.VALB 2000 0.000000000000000e+00 0.000000000000000e+00 ... xxx:interp.VALC 2000 0.000000000000000e+00 0.000000000000000e+00 ... ---end file interp.load--- You can edit this file to change the array values. Note that the first number ("2000") on the line beginning "xxx:interp.VALA" is the number of array values specified on the rest of the line. (I've chopped the line off after two array values in this example.) Tim Mooney 8/25/2011