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  <20192020  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Stream device character parse
From: Dirk Zimoch via Tech-talk <[email protected]>
To: <[email protected]>
Date: Thu, 11 Apr 2019 14:15:11 +0200

On 11.04.19 14:07, Dirk Zimoch via Tech-talk wrote:
%m


But you need to scale. %m reads 86-5 as 86e-5. To get to 8.6e-5 set field (ASLO, "0.1")



Completely different approach: regsub
This re-writes the input to something readable.

"#/([0-9])([0-9]*)([-+][0-9]+)/\1.\2e\3/%f"




https://paulscherrerinstitute.github.io/StreamDevice/formats.html#mantexp


On 11.04.19 09:31, 吴煊 via Tech-talk wrote:
Hi all,

I use stream device to get vaccum degree, the response is like 86+3, means 8.6*10^3; 86-5, means 8.6*10^-5. What is the best way to get the value by using protocol or record?

Thanks,

Xuan


References:
Stream device character parse 吴煊 via Tech-talk
Re: Stream device character parse Dirk Zimoch via Tech-talk

Navigate by Date:
Prev: Re: Stream device character parse Dr. Bastian Löher via Tech-talk
Next: Re: Stream device character parse Dirk Zimoch 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream device character parse Dr. Bastian Löher via Tech-talk
Next: Re: Stream device character parse Dirk Zimoch 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  <20192020  2021  2022  2023  2024 
ANJ, 11 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·