Thanks for your answer.
I've read the documentation and I think I am using the Calibrate_1200 function correctly. Here is a bit of code:
iStatus=AI_Configure(iDevice,-1,1,0,0,0); //bipolar
iStatus=Calibrate_1200(iDevice,2,1,EEPROMlocBipolar,calRefChan,grndRefChan,0,0,calRefVolts,iGain);
iRetVal=NIDAQErrorHandler(iStatus,"Calibrate_1200",0);
This returns error number 10801. I've tried it with several cards (not just the one I need to calibrate).
If I check the reading directly after calibration (using the test panel) I get almost correct values (0.05V for Grnd, 4.96V for +5V). If I then try to read again using the new calibration:
iStatus=Calibrate_1200(iDevice,5,0,EEPROMlocBipolar,0,0,0,0,0,0);
iStatus=AI_VRead(iDevice,grndRefChan,iGain,&dVol
tageGrnd);
then the voltages return to their pre-calibration values (i.e. 0.144V for the channel connected to ground, 4.85 for +5V).
Any further help would be much appreciated.
Thanks,
henrik