From f2bdfdfd13abe155316fd036c4a38ee6a687c11e Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 22 May 2003 16:13:12 +0000 Subject: [PATCH] still trying to get 611x ai to calibrate well, trying to increase settling time now. --- comedi_calibrate/ni.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index 02eeee4..a2d4cec 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -497,11 +497,11 @@ static unsigned int cal_gain_register_bits_611x( double reference, double *volta { int bits; - bits = 201.0 * ( *voltage / reference ) - 1.0; + bits = 200.0 * ( *voltage / reference ); if( bits > 200 ) bits = 200; if( bits < 0 ) bits = 0; - *voltage = reference * ( ( bits + 1 ) / 201.0 ); + *voltage = reference * ( bits / 200.0 ); return bits; } @@ -540,7 +540,7 @@ static void ni_setup_observables_611x( calibration_setup_t *setup ) int num_ai_channels, num_ai_ranges; static const int num_ao_channels = 2; - setup->settling_time_ns = 1000000; + setup->settling_time_ns = 10000000; master_reference = ni_get_reference( setup, ni_board( setup )->ref_eeprom_lsb, ni_board( setup )->ref_eeprom_msb ); -- 2.26.2