Experimental Physics and
| |||||||||||||||
|
On 25.07.2010 20:32, Angus Gratton wrote: [...] 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. As Mark pointed out, this is generally the way to go. Note, though, that you don't need the additional CALC record to convert from something else. Instead of overwriting, Device Support should *use* the EGUL and EGUF values that the db designer created. That way an ao with "...@5V BIP" and EGUF/EGUL = +/- 5 will convert from "output voltage" to the 16-bit integer your card needs, while setting EGUF/EGUL to something else will do the linear conversion from that "something else" range to your raw value. This is the whole point of having EGUF/EGUL/EGU as design fields - the only thing Device Support has to do is calculate the actual conversion factors, as only the Device Support reads the jumper info from the OUT link, and knows the bit width and other particularities of that device. Please do not write your device support starting from scratch. Copy the device support for a device that is similar to yours, understand it, refactor to get all the names right, then apply the changes necessary for your specific hardware. That way you probably will not only learn a lot, but also have a better support library in less time. Good luck! Ralph
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |