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: Analog output device support design
From: Angus Gratton <[email protected]>
To: EPICS tech-talk <[email protected]>
Date: Mon, 26 Jul 2010 10:32:10 +1000
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!


Replies:
RE: Analog output device support design Mark Rivers
Re: Analog output device support design Ralph Lange

Navigate by Date:
Prev: Re: timestamp for change in monitored PV Ralph Lange
Next: RE: Analog output device support design Mark Rivers
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: Re: timestamp for change in monitored PV Ralph Lange
Next: RE: Analog output device support design Mark Rivers
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 ·