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: "Steven M. Hartman" <[email protected]>
To: "[email protected]" <[email protected]>, tech-talk <[email protected]>
Date: Thu, 21 Oct 2010 11:21:39 -0400
Silver wrote:

I need to implement a function for insertion device like this:
Read a two-dimensions table file from the disk, which is values for gap positions and Correction coil power supplies (one gap value corresponding to 4 power supply value). If a gap position is set from the operator, four power supplies will be set automatically.
I want to use SNC language to do this, for reading the data from disk, use an asub record for it. Is it ok? Is there any better ways? Did anyone finish this job before? Any suggestions are appreciated.


I did something very similar a few years back. I used lookup tables (breakpoint tables) as a feed forward for non-linear tune compensation for an insertion device (wiggler). The feed forwards, based on wiggler 'K', drove 9 quad families (about two dozen power supplies including series main coils and trims) to compensate for the non-linear betatron tune shifts from the wiggler. (With another feed forward implemented in a similar manner to compensate for orbit shifts.)

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).

Note that in base >= 3.14.9, breakpoint tables must be monotonic by default. There is a flag to over-ride this requirement which must be used when using the breakpoint table in this type of compensation which likely needs a non-monotonic lookup table.

--
Steven Hartman
[email protected] || 865-466-6473

Replies:
Re: Lookup table problem Ralph Lange
References:
Lookup table problem Silver

Navigate by Date:
Prev: Re: Lookup table problem Ralph Lange
Next: cross-gcc-2.9.6 problem 王林
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 Ralph Lange
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 ·