EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ASLO / AOFF scaling for ai and ao record
From: Tim Mooney <[email protected]>
To: Stefan Heim <[email protected]>
Cc: EPICS tech talk <[email protected]>
Date: Fri, 13 Jul 2007 17:04:36 -0500
Stefan Heim wrote:
Tim,

On Freitag, 13. Juli 2007, you wrote:
Stefan Heim wrote:
In the streamdevice protocol file I have (among others)

getX {
        out "Joe Crds ?";
        in "Joe Crds %f %*f %*f %*f %*f %*f %*f ";
}

setX {
out "Joe AxisAbs 1 %(VAL)f";
in "Joe started";
}
[...]
I think you are *telling* the streamDevice to ignore ASLO and AOFF, by
using the
format "%(VAL)f".

That's indeed the case. It's a feature, not a bug ;-) If I use %f instead of %(VAL)f, I get the desired ASLO/AOFF scaling with streamdevice and an ao record.


As I read the doc, it would do what you want if you used the
format "%f". According to streamDevice/doc/ao.html, the streamDevice
would, in this case, perform the calculation


|OUTPUT_VALUE = (OVAL-AOFF)/ASLO

without converting to integer. (I.e., the streamDevice would grab the
required
field values, and perform the calculation independently of the record.)

Can't believe this has slipped through my attention! Stupid mistake, thank you for getting me back on track.


On a academic basis I still wonder whether to give the responsibility to honour ASLO/AOFF to the device support is a good idea. Aren't ASLO/AOFF supposed to be a property of _any_ ao record, regardless what device support it might reside on?

Thanks again,
-Stefan

Yes, and your record is using these fields to calculate a value for RVAL. Unfortunately,
RVAL isn't useful in your application because it's integer-valued. So streamDevice is
just doing what all device support is permitted to do, which is to use information from
the record to craft a value that a device will be able to understand. It would be bad if,
for example, streamDevice were to use AOFF as some kind of address, and ASLO as a
place to store the device's serial number. That would be weird.


--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group (www.aps.anl.gov/aod/bcda)
Advanced Photon Source, Argonne National Lab


Replies:
Re: ASLO / AOFF scaling for ai and ao record Stefan Heim
References:
ASLO / AOFF scaling for ai and ao record Stefan Heim
Re: ASLO / AOFF scaling for ai and ao record Tim Mooney
Re: ASLO / AOFF scaling for ai and ao record Stefan Heim

Navigate by Date:
Prev: Re: ASLO / AOFF scaling for ai and ao record Stefan Heim
Next: Asyn 4.8 compile error with Linux GPIB Jiro Fujita
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ASLO / AOFF scaling for ai and ao record Stefan Heim
Next: Re: ASLO / AOFF scaling for ai and ao record Stefan Heim
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·