added some comments about how internal voltage reference appears when

using +-50V or +-20V input ranges
This commit is contained in:
Frank Mori Hess 2002-11-29 22:02:35 +00:00
parent a1b5be053f
commit 48b8faab17

View 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 );