Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

correction of analog input values

Hello ,

 

I am using the NI Measurement Hardware Driver Development Kit. The example code he is using is attached below (NI_RT_TEST_2013.zip).
 
For voltage measurementsh I am using is NI 6250 and NI-6232 card.
The analog input of this cards has a special input circuit which makes a correction of the value which comes from the ADC neccesary through the coefficiants stored in the cards Eprom.
Therefor the example code has a special function which is called aiPolynomialScaler(). You can find this function in the scale.cpp file.
The output of this function is causing our issue!
 
By checking the resource monitor I doublechecked the value of the variable "scaled" and get the resulting value of 15.5534V when I have an input voltage of 5V.
I am expecting the output value of the function to be round about 5V as well.

I have attached 2 screendumps concerning this test. (Debug_Outputs.jpg and Debug_Outputs2.jpg in Screeshots.zip)
This can also be seen in MAX (Test with MAX-5V.JPG in Screeshots.zip)
 
I switched through the scale modes. The result did not change at all. Therefor see Test with order.JPG.

Now, my questions are:
- Why is the function returning around 15V when it should return around 5V?
- Why doesn't the function scale at all?
- What can I do to pinpoint the error?

Download All
0 Kudos
Message 1 of 6
(7,734 Views)

Hello udowalter,

 

I'm looking into this problem. I did some quick math based on your screenshots (showing debug values) as well as the aiPOlynomialScaler operations. The raw data values and the caoefficients shown in your screenshot show will result in a result of ~15.5V.

 

Which card is used when you get these weird values back? Do both the 6232 and the 6250 return 15.5V instead of 5V?

 

Thanks,

Steven T.

0 Kudos
Message 2 of 6
(7,704 Views)

Hello Stefan,

 

sorry for writing so late, but at the moment I'm very busy.

 

In  this example it was the PCI6250 card. I want to use the PCI 6232 too, but at the moment I look at the problem of the first card.

 

Thank for your help.

 

Regards

 

Udo

 

 

 

 

 

0 Kudos
Message 3 of 6
(7,672 Views)

Hello Udo,

 

The have seen the PCIe-6259 and other cards work correctly with the DDK. Unfortunately, your zip file is password protected preventing me from even inspecting your code to see if anything vital has been accidentally modified.

 

There is also a post regarding collisions that can take place when using the PCI-6232 cards. If your application uses dio you can run into problems.

 

http://forums.ni.com/t5/Driver-Development-Kit-DDK/Turning-Reference-attenuation-off-for-AOs-on-6230...

 

Please let me know your status and I'll be happy to assist you further.

Steven T.

0 Kudos
Message 4 of 6
(7,593 Views)

Hello Stefan,

 

the password for the zipped files  is "password".  I'm using  at  the moment only the Analog-Input functionality od the A/D converter card.  Please look into the zipped files and you will see what I mean.

 

Beste regards

 

Udo

0 Kudos
Message 5 of 6
(7,565 Views)

Hello udo,

 

I started my investigation by diffing the files you sent with the files that we provide for the DDK. Your files are heavily modified to surpress any and all warnings and errors regarding DMA. Additionaly, the read loops for the DMA examples themselves have been modified to get rid of code that ensures that only relevant data is retrieved.

 

This is the reason why the examples are providing bad data. I would recommend starting with the original examples again. You can run them and make sure you get expected data.

 

Thanks,

Steven T.

0 Kudos
Message 6 of 6
(7,549 Views)