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

Subject: genSub
From: "Szalata, Zenon M." <[email protected]>
To: "EPICS Techtalk" <[email protected]>
Date: Wed, 12 Mar 2008 15:08:43 -0700
In my soft IOC a waveform record reads a string of numeric data from an instrument in ASCII format separated by ','.  This string varies in length from one reading to the next.  I use genSub to convert the ASCII data to floating point data.  I bring the ASCII data into genSub via INPA, for which I set FTA="CHAR".
I discovered that if a shorter string follows a longer string, in INPA the new string data is followed by the remainder of the previous string!  I fixed that by using memset() function after the string was converted.  Is this a design behavior of genSub? Is there a better way to get rid of leftover data from previous read than I am doing?

My IOC is coded with asyn and streamdevice.  I suppose I should look at how to use stream device to convert the data.  I use genSub not only to convert the data but also to scale the data and correct for an offset, both of these are read from the instrument, prior to reading the waveform data.
Thanks,

Zen


Replies:
Re: genSub Matthieu Bec
Re: genSub Andy Foster

Navigate by Date:
Prev: Re: genSub Matthieu Bec
Next: Re: genSub Andy Foster
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Agilent E5810 GPIB Gateway issue Robert Emery
Next: Re: genSub Matthieu Bec
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·