Experimental Physics and Industrial Control System
|
Hi Andrew
Andrew Johnson wrote:
Dirk Zimoch wrote:
if you driver does not set ESLO and EOFF, you can set it in your db.
Calculate manually what to set. I did the same with StreamDevice.
...
Don't forget to set LINR to "LINEAR", of course.
If you want to set ESLO and EOFF yourself, you should set LINR to
"SLOPE" rather than "LINEAR" or there's a danger the device support will
overwrite your values if someone modifies any of the conversion fields.
StreamDevice might not do so if it doesn't have a special_linconv
routine, but then it's not following the full ai/ao standard. Most
analog device supports will overwrite ESLO and EOFF; by relying on non-
standard behaviour you're making it harder for someone to replace
hardware using a StreamDevice interface with some other device, because
they now have to change more than just the DTYP and INP/OUT field of
their database records when they move (and they might not realize that).
In 3.13, there was no "SLOPE", and even now I cannot find any 3.14
Record Reference Manual which would explain the use of "SLOPE".
StreamDevice does not make a difference between "SLOPE" and "LINEAR" at
the moment.
StreamDevice should have some way for the author of a protocol file to
specify what the device's raw range actually is for analog records, and
it should perform the calculation of ESLO and EOFF from that raw range
and the EGUL+EGUF pair.
I think, I will add that. This can easily be done with two variables in
the protocol file.
The other option you might want to support if
you don't already would be to control whether any conversions get done
at all - many instruments return engineering units anyway, and that's
why the analog records allow the device layer to set the VAL field
directly and return 2. This is used a lot for GPIB instrumentation.
That's what I do. If a floating point format is used with ai or ao, the
device support uses the VAL field. See the StreamDevice documentation
for each record type.
Dirk
--
Dr. Dirk Zimoch
Swiss Light Source
Computing and Controls
Paul Scherrer Institut
phone +41 56 310 5182
fax +41 56 310 4413
- Replies:
- Re: Scaling Database entries Andrew Johnson
- References:
- RE: Scaling Database entries David Dudley
- Re: Scaling Database entries Dirk Zimoch
- Re: Scaling Database entries Andrew Johnson
- Navigate by Date:
- Prev:
the body. No never should Khayman smile as he of Rodney Sullivan
- Next:
Re: Scaling Database entries Andrew Johnson
- 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:
Re: Scaling Database entries Andrew Johnson
- Next:
Re: Scaling Database entries Andrew Johnson
- 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
|
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|