table of contents
COMEDI_FROM_PHYS(3) | Comedi reference | COMEDI_FROM_PHYS(3) |
NAME¶
comedi_from_phys - convert physical units to sampleSYNOPSIS¶
#include <comedilib.h>
lsampl_t
comedi_from_phys(double data,
comedi_range * range,
lsampl_t maxdata);
DESCRIPTION¶
Converts parameter data given in physical units ( double) into sample values ( lsampl_t, between 0 and maxdata). The parameter range represents the conversion information to use, and the parameter maxdata represents the maximum possible data value for the channel that the data will be written to. The mapping between physical units and raw data is linear and assumes that the converter has ideal characteristics. Conversion is not affected by out-of-range behavior. Out-of-range data parameters are silently truncated to the range 0 to maxdata.AUTHORS¶
David Schleef <ds@schleef.org>Author.
Frank Mori Hess <fmhess@users.sourceforge.net>
Author.
Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
Author.
Bernd Porr <tech@linux-usb-daq.co.uk>
Author.
Ian Abbott <abbotti@mev.co.uk>
Author.
COPYRIGHT¶
Copyright © 1998-2003 David Schleef07/06/2012 | Comedi |