Disable attempt to do unipolar postgain calibration on measurement computing

pci-das1602/16 boards, since it is failing badly.
This commit is contained in:
Frank Mori Hess 2003-06-17 00:05:28 +00:00
parent 11264f9d01
commit b0a4a1dbd0
3 changed files with 17 additions and 6 deletions

View file

@ -259,8 +259,11 @@ int generic_cal_by_channel_and_range( calibration_setup_t *setup,
sc_push_range( current_cal, range );
postgain_bip = setup->caldacs[ layout->adc_postgain_offset( channel ) ].current;
/* unipolar postgain */
current_cal = sc_alloc_calibration_setting( setup );
generic_do_adc_postgain_offset( setup, layout, current_cal, channel, 1 );
if( layout->do_adc_unipolar_postgain )
{
current_cal = sc_alloc_calibration_setting( setup );
generic_do_adc_postgain_offset( setup, layout, current_cal, channel, 1 );
}
for( range = 0; range < num_ai_ranges; range++ )
if( is_unipolar( setup->dev, setup->ad_subdev, channel, range ) )
sc_push_range( current_cal, range );
@ -329,11 +332,13 @@ int generic_cal_by_range( calibration_setup_t *setup,
if( is_bipolar( setup->dev, setup->ad_subdev, 0, range ) )
sc_push_range( current_cal, range );
postgain_bip = setup->caldacs[ layout->adc_postgain_offset( 0 ) ].current;
/* unipolar postgain */
current_cal = sc_alloc_calibration_setting( setup );
generic_do_adc_postgain_offset( setup, layout, current_cal, 0, 1 );
sc_push_channel( current_cal, SC_ALL_CHANNELS );
if( layout->do_adc_unipolar_postgain )
{
current_cal = sc_alloc_calibration_setting( setup );
generic_do_adc_postgain_offset( setup, layout, current_cal, 0, 1 );
sc_push_channel( current_cal, SC_ALL_CHANNELS );
}
for( range = 0; range < num_ai_ranges; range++ )
if( is_unipolar( setup->dev, setup->ad_subdev, 0, range ) )
sc_push_range( current_cal, range );
@ -390,4 +395,5 @@ void init_generic_layout( generic_layout_t *layout )
layout->adc_ground_observable = dummy_observable;
layout->dac_high_observable = dummy_observable;
layout->dac_ground_observable = dummy_observable;
layout->do_adc_unipolar_postgain = 1;
}

View file

@ -251,6 +251,7 @@ typedef struct
unsigned int channel, unsigned int range );
int (*dac_ground_observable)( const calibration_setup_t *setup,
unsigned int channel, unsigned int range );
unsigned do_adc_unipolar_postgain : 1;
} generic_layout_t;
void init_generic_layout( generic_layout_t *layout );
int generic_cal_by_channel_and_range( calibration_setup_t *setup,

View file

@ -489,6 +489,10 @@ static int cal_cb_pci_1602_16( calibration_setup_t *setup )
layout.adc_ground_observable = ai_ground_observable_1xxx;
layout.dac_high_observable = ao_high_observable_1xxx;
layout.dac_ground_observable = ao_ground_observable_1xxx;
/* On unipolar ranges, both the gain and offset adjustments couple
* to the ground observables. I don't know if there is a way
* to get around it, so we'll just use the bipolar postgain setting. */
layout.do_adc_unipolar_postgain = 0;
return generic_cal_by_range( setup, &layout );
}