LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Systematic daqmx read gain error in Labview (not the card)

Hi All,
 
I have a nasty problem with my data acquisition software that looks like a Labview bug. I'm running system with PCIe 6259 card, Labview 8.2.1 and windows XP. Problem is that the voltage read out from analog inputs by labview has about 5% gain error. For example -5V shows up as -4.75V and -9V as -8.55V. When i look at the voltage value with measurement and automation explorer, the voltage is correct. This makes me convinced that something strange is happening in Labview. Inputs are set from -10 to 10V in NRSE mode and i'm using Analog 2D I16 NChan NSamp to read the data (gain error is already in the array this function returns).
 
I'm puzzled. Of course it's possible to correct for the error by a scale factor but surely this is a kind of problem that needs to be fixed. All the help would be greatly appreciated.
 
Cheers,
Mikko
0 Kudos
Message 1 of 6
(3,690 Views)

I *think* that the M-series boards store on-board calibration parameters for such gain corrections which are *not* applied when you request "raw" reads of the 16-bit integer A/D value.  They are applied when you read as floating-point DBL or as waveform, such as in MAX.  Try changing your LV code to read an array of DBLs and see if it doesn't help.

Sure enough, here's one link to a similar thread, and there are many more if you search for keywords like "M-series" and "raw".

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 6
(3,677 Views)

Hello Mikko,

Actually, if this does turn out to be a bug, it is almost certainly a problem with the NI-DAQmx driver and not a problem with LabVIEW.  What version of NI-DAQmx are you using?  If you don't know what version you have installed, open Measurement & Automation Explorer and click on the NI-DAQmx entry in the Software folder on the left under Configuration to see what version you have.

0 Kudos
Message 3 of 6
(3,641 Views)

hello

 

Have you solved the problem?

I've the same error (5%) with PCI-6259 board with a difference:i am not using Windows and LabView but Ubuntu with Comedi driver.

If I acquire the voltage from the analog input with a terminal SCC-68 i saw that the reading done on LabView or a multimeter is the same but on Linux I find this error.
 
All the help would be greatly appreciated.
 
Thanks
 
Chiara
0 Kudos
Message 4 of 6
(3,422 Views)

Hi Chiara,

 

Since the device is working properly with DAQmx, I will assume that the issue is with the way that the Comedi driver is interacting with our device.  Although I have not had the chance to try out the Comedi driver myself (it is not officially supported on these forums), one possible cause of the problem could be how Comedi handles the calibration coefficients.

 

Like our other M Series devices, the 6259 calibration is based off of our MI-Cal Methodology.  To summarize the information in the link, the 6259 stores 3rd-order coefficients on its EEPROM when it is calibrated--the coefficients are applied in software to correct for gain/offset/nonlinearities in your measurement.  The DAQmx driver will read in these calibration values and apply the 3rd order polynomial to your measurement.  I am not completely familiar with the Comedi driver, but it could be possible that it is not using the calibration coefficients. 

 

If this is the case, one solution may be to apply calibration coefficients yourself.  You can use DAQmx to get the values of the calibration coefficients with the following property node:

 

Scaling_Coeff.png

Another option would be to measure your own calibration information through the Comedi API.  You can measure a known voltage reference using the Comedi drivers--you would need at least two different voltage levels to compute a linear calibration equation (gain + offset).  Of course, you could measure a higher number of points and compute a higher-order equation.  You would then apply these coefficients to the device.

 

 

The 5% number also stands out a bit to me.  The following paragraph is from page 4-2 of the M Series User Manual:

 

M_Series Manual Screen.png

 Perhaps the Comedi driver is not accounting for the 5% increase in nominal range that the M series devices utilize for calibration.  Again, I am not familiar with the options of the Comedi driver, but if it is possible to read unscaled binary data, you should be able to apply the scaling yourself in software.

 

 

-John

John Passiak
0 Kudos
Message 5 of 6
(3,401 Views)

One more thing to add,

 

You might want to try posting to the Linux User's Group section of the community.  While DAQmx does not officially support Ubuntu, there are people out there who are successfully using it.  The Linux User's Group would be a good place to try to find help with getting this to work.

 

Also, you might try searching the Comedi website (www.comedi.org) for possible support with their driver.  Again, the driver is not officially supported by NI (but we're always happy to help if we can).  I hope this information proves helpful.

 

 

-John

John Passiak
0 Kudos
Message 6 of 6
(3,395 Views)