EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: ai, soft channel, and breakpoint table
From: "Martin L. Smith" <[email protected]>
To: John Dobbins <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Wed, 18 Jul 2007 06:42:28 -0500
John Dobbins wrote:
Is it possible to use a breakpoint table in an ai record to convert the output of another ai record (without loss of resolution)?

I have an ai record for which device support retrieves a floating point value from hardware and puts it directly into the VAL field.

I would like to use a breakpoint table in a second ai record to convert the reading of the first record - which (as I understand it) would require me to use a "Raw Soft Channel". Will a "Raw Soft Channel" ai record, in reading a value into RVAL, convert it to an integer (with a loss of resolution)?

Alternatives?

Thanks and regards,

John Dobbins
Lab for Elementary Particle Physics
Cornell University

Hi John,


I am using a break point table just like you describe for encoder
feedback. I have one ai record that reads the encoder value directly
from hardware and another ai record that uses the RVAL field of the
first record along with the breakpoint table to lookup its value.
Here is the Db excerpt:

record(ai,"ID$(ID):USRotaryEncoderRaw") {
        field(DESC,"Upstream Rotary Encoder")
        field(DTYP,"ESRF Varoc Absolute Encoder Interface")
        field(INP,"#C0 S$(E1) @$(RE1),1,0")
        field(PREC,"4")
        field(EGU,"mm")
        field(AOFF,"$(R1)")
        field(ASLO,"$(RS1)")
}
record(ai,"ID$(ID):USRotaryEncoderCalc") {
        field(DESC,"Upstream Rotary Encoder")
        field(DTYP,"Raw Soft Channel")
        field(INP,"ID$(ID):USRotaryEncoderRaw.RVAL NPP NMS")
        field(LINR,"USRotary")
        field(PREC,"4")
        field(EGU,"mm")
}

As far as the resolution goes I think that it is a matter of the
breakpoint table resolution and the EncoderCalc records PREC field.
The breakpoint table that I use is automatically generated by a script.
The LINR field tells the record where to find the lookup data.
Below is an excerpt from my breakpoint table for this record:

breaktable(USRotary){
1968631 198.9998
1978311 175.0003
1988388 149.9998
1998457 125.0003
2008532 99.9992


Marty Smith ANL/APS Controls Group

References:
ai, soft channel, and breakpoint table John Dobbins

Navigate by Date:
Prev: RE: IPac driver organisation Denison, PN (Peter)
Next: RE: IPac driver organisation Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: ai, soft channel, and breakpoint table Allison, Stephanie
Next: MEDM fonts? Heinrich du Toit
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·