1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 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 2006 2007 2008 2009 2010 2011 <2012> 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: aiRecord conversion |
From: | Eric Norum <[email protected]> |
To: | Bruno Seiva Martins <[email protected]> |
Cc: | [email protected] |
Date: | Tue, 28 Aug 2012 08:31:37 -0700 |
Well, it may be, "the top Google result for "epics record reference".", but it's still wrong. Here's the code itself. static void convert(aiRecord *prec) { double val; val = (double)prec->rval + (double)prec->roff; /* adjust slope and offset */ if(prec->aslo!=0.0) val*=prec->aslo; val+=prec->aoff; /* convert raw to engineering units and signal units */ switch (prec->linr) { case menuConvertNO_CONVERSION: break; /* do nothing*/ case menuConvertLINEAR: case menuConvertSLOPE: val = (val * prec->eslo) + prec->eoff; break; default: /* must use breakpoint table */ if (cvtRawToEngBpt(&val,prec->linr,prec->init,(void *)&prec->pbrk,&prec->lbrk)!=0) { recGblSetSevr(prec,SOFT_ALARM,MAJOR_ALARM); } } NOTE TO WHOMEVER IS MAINTAINING http://www.aps.anl.gov/epics/EpicsDocumentation/AppDevManuals/RecordRef/Recordref-8.html#HEADING8-0 ---- IT NEEDS TO BE FIXED! On Aug 28, 2012, at 6:55 AM, Bruno Seiva Martins <[email protected]> wrote:
--
Eric Norum [email protected] |