From: Frank Mori Hess Date: Fri, 29 Nov 2002 22:02:35 +0000 (+0000) Subject: added some comments about how internal voltage reference appears when X-Git-Tag: r0_7_21~278 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48b8faab177763f99d3769fc37df72258a23e0cd;p=comedilib.git added some comments about how internal voltage reference appears when using +-50V or +-20V input ranges --- diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index 695ea0a..0f40057 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -313,12 +313,13 @@ void ni_setup_observables( calibration_setup_t *setup ) } } +/* XXX for +-50V and +-20V ranges, the reference source goes 0V + * to 50V instead of 0V to 5V */ static unsigned int cal_gain_register_bits_611x( double *voltage ) { unsigned int bits; bits = 200.0 * ( *voltage / 5.0 ); - if( bits < 1 ) bits = 1; if( bits > 200 ) bits = 200; *voltage = 5.0 * ( bits / 200.0 );