From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

self calibration of NI PCI-6251 (M series) using the DDK

Solved!
Go to solution
Hi,
 
I am new in this froum, and I started with the DDK two weeks ago, and so far I got most of the things that I need to work with the NI PCI-6251 (M series) DAQ board plugged into an Intel Dual Atom board D945GCLF2 running (Pure)Darwin 9.6 (build 9G55 -- this is not Mac OS X).

BTW: NI-DAQmx for Mac OS X utilizes a hell a lot of Apple's closed source frameworks and therefore it does not work on a strictly Open Source Darwin installation. That's the reason why I have to live with the functionality provided by the DDK.
 
I read the articles on calibration and I searched the NI discussion forum, and my understanding so far is, that self-calibration is possible using the DDK, but it is not that easy as with MAX.
 
First question:

   Is it really basically possible to get self-calibration of a PCI-6251 somehow to work using the DDK?


If YES

I read the article http://zone.ni.com/devzone/cda/tut/p/id/3688  about the sophisticated polynomial calibration scheme for the M series boards named NI-MCal, and the second question is:

   Is the NI-MCal routine implemented at the DAQ board and that does already most of the magic,
   or do I need to implement the whole NI-MCal sequence step-by-step by software by myself?

If YES (magic routine at the board)

   How can I utilize it using the DDK?


If NO (no magic routine at the DAQ board)

From said article I understood that the NI-MCal sequence works follows:

1. Linearity Correction
    a) measure the INL of the ADC by sweeping the on-board
        PWM based DAC through the entire range

    b) smoothing and curve fitting to a third order polynomial

    c) interpolation

2. Offset and Gain Calibration (to be repeated for each ADC range)
    a) measure the offset based on the corrected INL against
        the on-board ground reference.

    b) for the 10 V range use the on-board voltage reference as is,
        for the other ranges, use the onboard PWM DAC is used in conjunction
        with the calibrated 10 V range to generate precise voltage references

    c) measure the slope based on the corrected INL against
        the on-board voltage reference.

3. Store the calibration coefficients for later use


Final questions:
for 1.a) Is there somewhere an example on how to measure the INL using the PWM-DAC?
for 2.a) Is there somewhere an example on how to direct the ground reference into AI0?
for 2.b) Is there somewhere an example on how to combine the PWM-DAC with the
         calibrated 10 V range to generate precise voltage references for the other ranges?
for 2.c) Is there somewhere an example on how to direct the on-board voltage reference into AI0?

I won't have difficulties to get 1.b-c and 3. straight.

Many thanks in advance for any helpful response.

Best regards

Dr. Rolf Jansen

Message Edited by rolfheinrich on 03-12-2009 05:15 PM
Message Edited by rolfheinrich on 03-12-2009 05:16 PM
0 Kudos
Message 1 of 6
(13,346 Views)
Solution
Accepted by topic author rolfheinrich

I found out everything by myself.

 

- Yes, self-calibration of NI PCI-6251 is possible with the DDK,

   and I have a working implementation for Darwin on said

   Intel Dual Core Atom board D945GCLF2

 

- No, there is no magic routine at the board. Everything has

  to be done step by step by software.

 

1a) use AI_Config_FIFO_Bypass to select the calibration source 5

 

      board->AI_Config_FIFO_Bypass.setAI_Bypass_Config_FIFO(1);

      board->AI_Config_FIFO_Bypass.setAI_Bypass_Gain(1);

      board->AI_Config_FIFO_Bypass.setAI_Bypass_Cal_Sel_Pos(5);

      board->AI_Config_FIFO_Bypass.setAI_Bypass_Cal_Sel_Neg(0);

 

      and pass tMSeries::tAI_Config_FIFO_Data::kAI_Config_Channel_TypeCalibration to aiConfigureChannel()

 

      and set the PWM High/Low_Time (below code sets the PWM-CalDAC to +7.5 V)

 

      board->Cal_PWM.setLow_Time(896);

      board->Cal_PWM.setHigh_Time(128);

 

 

 2a)  use AI_Config_FIFO_Bypass to select the calibration source 1 (see code above)

 

 2b)  for calibrating the +/- 5 V range, set(Low/High)_Time to 128 / 64 (ca. 3.3 V),

        and measure the exact value with the calibrated 10 V range,

        then use this exact value as reference for the 5V range

 

 2c)  use AI_Config_FIFO_Bypass to select the calibration source 2 (see code above)

 

 

BTW: A calibration sweep of the PWM-CalDACs from - 10 to +10 V showed that the characteristics of the ADC at my NI PCI-6251 is almost linear, this was already suggested by the 2nd and 3rd order calibration constants (3.97e-11, 5.89e-15), that I found in the EEPROM of my board. As a matter of fact, the simulated deviation from the ideal straight line is only ±0.6 LSB at a reading of ±FS. Furthermore, a simulation with the calibration constants that I found in the EEPROM do not fit well to the results of said calibration sweep (see the 2 curves that are attached to this message).

 

Best regards

 

Dr. Rolf Jansen


Download All
Message 2 of 6
(13,288 Views)
I want to make my self calibration routine for the NI PCI-6251 more sophisticated and I made some more experiments with the settings of the AI_Config_FIFO_Bypass register. From this I already can unambiguously relate some values for AI_Bypass_Cal_Sel_Neg and AI_Bypass_Cal_Sel_Pos to physical signal sources.
 
Here comes, what I found out so far for the assignments for AI_Bypass_Cal_Sel_Pos/Neg to the signal sources
 
AI_Bypass_Cal_Sel_Pos
 
0 ground ? AI or AO
1 ground ? AI or AO
2 internal reference ca. 7 V
3 calibration source low ca. 0.5 V
4 calibration source mid ca. 2 V
5 calibration source high ca. 10 V
6 ground ? AI or AO
7 AOx where x depends on the value of AO_Bypass_AO_Cal_Sel
 
The voltages of the signals 3, 4, and 5 can be modified by the relation of High_Time to Low_Time in the Cal_PWM register.
 
AI_Bypass_Cal_Sel_Neg
 
0 ground ? AI or AO
1 ground ? AI or AO
2 temperature sensor ? ca. 1 V
3 AI0 ?
4 AI8 ?
5 ground ? AI or AO
6 ground ? AI or AO
7 calibration source high ca. 10 V
 
As you can see from the question marks, I have still some doubts, and perhaps somebody can enlighten me.
 
Many thanks in advance for any helpful response.
 
Best regards
 
Dr. Rolf Jansen
0 Kudos
Message 3 of 6
(12,357 Views)
Hi Rolf,

After a lot of digging and a lucky stumble, I found some more information for you.

AI_Bypass_Cal_Sel_Pos
0    (SCXI)
1    (SCXI)
2    correct
3    correct
4    correct
5    correct
6    AI Ground
7    correct

AI_Bypass_Cal_Sel_Neg
0    (SCXI)
1    (SCXI)
2    correct
3    AI Sense
4    AI Sense2
5    AO Ground
6    AI Ground
7    correct
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
Message 4 of 6
(12,062 Views)

Hi Joe,

 

many thanks for the helpful information. With that I corrected already the calibration module of my program, because I assumed wrong selectors for AI Ground and AO Ground. Although the calibration did not show any significant change, I feel better now by using confirmed selectors.

 

By the way, I found out the relationship between the voltage reading of the internal Tsensor and the actual temperature in °C. For this I used MAX at a PC and during the warm-up phase of the DAQ-board, I noted down the voltage reading of the Tsensor from the test panel and correlated this to the displayed temperature.

 

A linear regression resulted almost exactly in:

 

     T(°C) = 100*abs(TsensorVoltage) - 50

 

Best regards

 

Rolf

 

0 Kudos
Message 5 of 6
(12,054 Views)

i am new to the labVIEW can any one help me how to generate a sequence using PCI6251. for example sequence should be the line should be 1 for 10us, 0 for 20us and 1 for 5us then it should go to zero.

0 Kudos
Message 6 of 6
(9,558 Views)