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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: stream protocol question: ASCII hex to 32-bit float |
From: | Kevin Peterson <[email protected]> |
To: | Eric Norum <[email protected]> |
Cc: | EPICS tech talk <[email protected]> |
Date: | Fri, 11 Mar 2016 15:05:55 -0600 |
Thanks. This calc works and will be good enough for the initial testing of the sensor. Kevin On 3/10/16 11:03 AM, Eric Norum wrote: > If you don’t need to worry about NaNs or Infinities I think that this > calc record will do what you need: > > record(calc, "floatMap") { > field(A, "0x3F800000") > field(CALC, > "B:=A?((A&0x7FFFFF)+0x800000)*2**(((A>>23)&255)-150):0;A&0x80000000?-B:B") > } > >