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  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: changing unit string to scale factor
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: 'Randall Cayford' <rcayford at lbl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 25 Jan 2021 20:40:01 +0000
There are a lot of useful records in that epics-modules/calc repository.

Mark


-----Original Message-----
From: Randall Cayford <rcayford at lbl.gov> 
Sent: Monday, January 25, 2021 2:38 PM
To: Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: changing unit string to scale factor

That looks like the right way to go.  It’s not in the base record types documentation so I hadn’t seen it.  Thanks!

> On Jan 25, 2021, at 12:27 PM, Mark Rivers <rivers at cars.uchicago.edu> wrote:
> 
> Look at the scalcout record:
> 
> http://htmlpreview.github.io/?https://github.com/epics-modules/calc/blob/master/documentation/sCalcoutRecord.html
> 
> Mark
> 
> 
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Randall Cayford via Tech-talk
> Sent: Monday, January 25, 2021 2:16 PM
> To: Engbretson, Mark S. via Tech-talk <tech-talk at aps.anl.gov>
> Subject: changing unit string to scale factor
> 
> I have a device which returns a value and a string indicating the units of the value.  I’ll get inputs like 0.3nA or 3.4mA, etc.  Since I want to report the value in a consistent unit, I want to convert the unit string to a scale factor (nA=1, uA=1000, mA=10000) and then use a calc record to scale the value.   CALC records seem to only take numbers as input and I don’t see any other appropriate record type.
> 
> In programming I would use a case statement or if-elseif constructs.  How do I do this with EPICS record processing?
> 
> Randall
> LBNL
> 


Replies:
Re: changing unit string to scale factor Jeong Han Lee via Tech-talk
References:
changing unit string to scale factor Randall Cayford via Tech-talk
RE: changing unit string to scale factor Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: changing unit string to scale factor Mark Rivers via Tech-talk
Next: Re: Channel connection performance Veseli, Sinisa via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: RE: changing unit string to scale factor Mark Rivers via Tech-talk
Next: Re: changing unit string to scale factor Jeong Han Lee via Tech-talk
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  <20212022  2023  2024 
ANJ, 25 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·