Experimental Physics and
| |||||||||||||||||
|
... 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). 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. 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. - Andrew -- There is considerable overlap between the intelligence of the smartest bears and the dumbest tourists -- Yosemite National Park Ranger
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |