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

Subject: RE: Analog output device support design
From: "Mark Rivers" <[email protected]>
To: "Angus Gratton" <[email protected]>, "EPICS tech-talk" <[email protected]>
Date: Sun, 25 Jul 2010 21:39:56 -0500
> Is that the right way to go? Or should I rejig the design so that units
> for ao.VAL is determined by the designer, units for ao.RVAL is the
> voltage, and conversion from Voltage->16-bit integer occurs in the
> driver layer?
 
I think your first suggestion is the best way.
 
I don't think you can really make ao.RVAL the voltage, because RVAL is  DBF_LONG, not DBF_DOUBLE, so to make it voltage you would have to work in milli-volts or micro-volts.
 
Mark
 


________________________________

From: [email protected] on behalf of Angus Gratton
Sent: Sun 7/25/2010 7:32 PM
To: EPICS tech-talk
Subject: Analog output device support design



I have a question about implementing unit conversions in device support.

It's more of an abstract design question, just to make sure I have the
approach right. I'm pretty new to EPICS.

So, specifically the device I'm adding support for is a Matrix MS-DA12-8
DAC. It's pretty straightforward register-based VME device.

Each channel can be physically jumpered for 5v, 10v or VExt and also for
unipolar (0-Nv) or bipolar(-Nv/+Nv) output. The driver writes a 16-bit
integer to a register, and the output voltage is determined by the
jumpers.

So at the "top" of the stack I have some number representing either a
voltage or a higher-level unit (ie degrees to set an actuator), and at
the "bottom" I have just a 16-bit integer.

I'm thinking that each record's OUT link can specify what jumper
settings are applied on the channel, ie OUT, "#C2 S3 @5v BIP" says
channel #3 is jumpered 5v Bipolar.

The device support can then set default EGUF and EGUL values that will
automatically work via linconv to convert VAL written in volts to RVAL
which is the 16-bit integer that goes to hardware.

If the database designer wants to layer a more meaningful value over the
volts (ie degrees) then they create another database CALC record that
set the volts in the AO record.


Is that the right way to go? Or should I rejig the design so that units
for ao.VAL is determined by the designer, units for ao.RVAL is the
voltage, and conversion from Voltage->16-bit integer occurs in the
driver layer?

I can see that all these methods will work, but I'm expecting that one
will turn out to be the recommended way to proceed...

Hope this makes sense.

Cheers,

- Angus

PS Thanks for all the great responses to my last newbie question!





References:
Analog output device support design Angus Gratton

Navigate by Date:
Prev: Analog output device support design Angus Gratton
Next: Re: Analog output device support design Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Analog output device support design Angus Gratton
Next: Re: Analog output device support design Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  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 ·