You are on the right track.
If the string came into dr:scalc.AA
(where is dr:scalc an scalcout record),
then use dr:scalc.CALC = "$S(AA,'%lg')"
to extract that result.
Pete
Dave Reid wrote:
I'm using an Asyn record to get a readback from a Kepco power supply via
GPIB. The return string comes back as an exponential, i.e. "1.5439E01".
Is there a slick way for taking this string and decoding it into a
float? Will the SSCANF facility in the SCALC record do this?
Thanks...
Dave Reid
University of Washington Medical Center
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <[email protected]>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
- Replies:
- seq/snl tutorial Laznovsky, Michael
- References:
- A question about decoding strings in Asyn.... Dave Reid
- Navigate by Date:
- Prev:
RE: A question about decoding strings in Asyn.... Mark Rivers
- Next:
Re: A question about decoding strings in Asyn.... Pete Jemian
- 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
- Navigate by Thread:
- Prev:
A question about decoding strings in Asyn.... Dave Reid
- Next:
seq/snl tutorial Laznovsky, Michael
- 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
|