EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  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  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: bug in break-point table conversion
From: Rolf Keitel <[email protected]>
To: tech_talk <[email protected]>
Date: Wed, 17 May 2006 08:38:20 -0700
The backward conversion is used in analogue output records. We need this e.g. for PID loops. A valve opening regulates Helium flow to maintain a constant temperature. Raw>>eng conversion for the sensor readback for display to the operator. Eng>>raw conversion used when the operator types the temperature set-point. The PID is done in a PLC, which just compares the raw setpoint and readback values.
- rolf -


D. Peter Siddons wrote:
I agree.

I'm not even sure when one would use the backward conversion. Isn't it always used forwards?

Pete.


Rolf Keitel wrote:
Andrew,
I am not sure if I understand your message correctly. Rejecting negative slopes (in the second column) of the breakpoint table would be too limiting. One can always arrange the raw value sequence in ascending order. The engineering sequence slope is then determined by your sensor (in our case Si cryo-diodes).
IMHO one doesn't have to go overboard with reengineering, as breakpoint tables are not really used "on the fly".
Documenting the requirements of monotonous curves in both columns, a positive slope in the raw column and fixing the code for the backward conversion would be sufficient for me.
Of course, dynamically reloading of breakpoint tables at run-time would be nice.


- rolf -

Andrew Johnson wrote:
D. Peter Siddons wrote:
I had also just run into this. It is also a bug in the makeBpt program to generate a table from raw data. It produces nonsense if the raw ADC values are in decreasing order and the engineering values are increasing. I didn't try it with positive slope but reversed data order. I thought that simply reversing the table order fixed it, but apparently not.

Rolf Keitel wrote:

There is a problem with break-point table conversion from engineering to raw values ( function cvtEngToRawBpt in file cvtBpt.c).
The function returns incorrect results, if the breakpoint table has negative slopes, i.e. if engineering values decrease with increasing raw values.

I couldn't find anything in the documentation when I looked briefly the other day, but I don't think the present breakpoint table code was ever supposed to work with negative slopes. Given the limitations of the existing code though it really ought to check its inputs properly and refuse to load a breakpoint table that slopes downwards.


Any replacement code that permits negative slopes should reject curves that are not continuously increasing or decreasing but have local minima or maxima - I have no idea what the existing code does with such curves, but I doubt that it's pretty. We would also like to be able to reload breakpoint tables at runtime (which I believe Benjamin Fransken implemented for BESSY but this isn't available in the official release).

Any offers to do a proper re-engineering of this (fairly self-contained) area of functionality in EPICS Base? If no-one offers I'll try to put in the positive slope test, but if a site needs more than that it'll have to donate some effort towards implementing it.

- Andrew





--
+-------------------------------------------------+
| Rolf Keitel, TRIUMF         Tel: (604) 222-7453 |
| Group Leader ISAC Controls  Fax: (604) 222-7307 |
| and Electronics Development                     |
| Vancouver, B.C., Canada                         |
+-------------------------------------------------+


References:
bug in break-point table conversion Rolf Keitel
Re: bug in break-point table conversion D. Peter Siddons
Re: bug in break-point table conversion Andrew Johnson
Re: bug in break-point table conversion Rolf Keitel
Re: bug in break-point table conversion D. Peter Siddons

Navigate by Date:
Prev: Re: bug in break-point table conversion D. Peter Siddons
Next: Document, visualize SNL code? Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: bug in break-point table conversion D. Peter Siddons
Next: Re: bug in break-point table conversion Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·