added some comments about how internal voltage reference appears when
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 29 Nov 2002 22:02:35 +0000 (22:02 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 29 Nov 2002 22:02:35 +0000 (22:02 +0000)
using +-50V or +-20V input ranges

comedi_calibrate/ni.c

index 695ea0a05904ad8286b70f390290d18434518443..0f4005738f3246b9223dbb5dec1ab1516b32e1d6 100644 (file)
@@ -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 );