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: Stefan Heim <[email protected]>
To: Tim Mooney <[email protected]>
Cc: EPICS tech talk <[email protected]>
Date: Sat, 14 Jul 2007 02:00:27 +0200
On Samstag, 14. Juli 2007, you wrote:
> Stefan Heim wrote:
> > 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?
>
> 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.

I'd expect the record to calculate a DRVAL (which it in fact does) - let alone 
the four letter field length limitation for now. Or even better, have RVAL be 
a double indeed, and let any device support that wants to consider it a long, 
short or char. The implicit cast to an integer when setting RVAL in 
aoRecord.c should not be done by the record layer.

> 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's a good thing device support has access to the record's parameters, 
including ASLO/AOFF.

Still, why does the record rely on device support for the ASLO/AOFF 
conversion? As an ao record, it should just feed it with (VAL - AOFF) / ASLO 
as output value, like the ai record hands out ASLO * (device support's)VAL + 
AOFF as .VAL to the world, completely transparent to device support (if it 
returns 2 from process()).

> 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.

I think it's weird for streamdevice device support to care about ASLO/AOFF. 
Streamdevice should - like any ao record device support - agree on a field 
name with the ao record that will be used for output; the ao record may offer 
an independent layer of transformation between its .VAL and that very field 
to the world, parameterized by ASLO/AOFF or whatever properties of the 
record. The values of ASLO and AOFF should be transparent to the device 
support.

Anyway, the IOC for the device works perfectly now. Thank you very much for 
your part in this great collection that is the world of EPICS. The ease of 
hooking up most of the devices at our beamline and experiments to the EPICS 
based control network with the help of ASYN/streamdevice was just 
unbelieveable.

-Stefan

-- 
Stefan Heim, PhD Student X-ray microscopy
BESSY mbH, Albert-Einstein-StraÃe 15, D-12489 Berlin, Germany
voice: +49 30 6392 3177 fax: + 49 30 6392 4757 e-mail: [email protected]
BESSY mbH - Mitglied der Leibniz Gemeinschaft
Vorsitzender des Aufsichtsrates: Prof. Dr. Dr. h.c. mult. Joachim Treusch
GeschÃftsfÃhrer: Prof. Dr. Dr. h.c. Wolfgang Eberhardt, Prof. Dr. Eberhard 
Jaeschke 
Sitz Berlin, AG Charlottenburg, HRB 14635


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

Navigate by Date:
Prev: Asyn 4.8 compile error with Linux GPIB Jiro Fujita
Next: Re: Scan question Ralph Lange
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 Tim Mooney
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 
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 ·