Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Scaling coefficients example when using raw data mode

Hello everyone,
 
I am struggeling with the following:
 
Software: visual studio 2005(C#)
Hardware: PCI 6220 M-series
 
I am sampling in raw data mode. Because I am using a M-series card I have to use the scaling coefficients in the software in order to get the right voltages. I am looking for an example in C# which shows me how to use these scaling coefficients.
 
Thanks in advance,
 
Souza.
0 Kudos
Message 1 of 4
(3,335 Views)
Souza,

I did not understand your question of  .. How to use scaling coefficients?

are you asking how to calculate what scaling you need? In that case it depends on number of bits of your card.

BTW which functions are you using to sample the raw data?

--

AJ


0 Kudos
Message 2 of 4
(3,311 Views)
Hello AJ,
 
I am sampling data at 10kHz and put them in a file. At first I sampled doubles. Then I saw the option of sampling the raw data. This will bring down the total amount of data which has to be stored in the file. The only difference is that I will have to calibrate the sampled values with my program, because I am using an M-series device. When I do not calibrate the raw data, the data will be slightly different compared to the sampled doubles.
 
To calibrate the raw data you need the scaling coefficients. I think, that I have to use these in the following way:
 
Let's say the scaling coefficients are as below. 
 
[0]  -0.0001356
[1]   0.00000000216530
[2]   0.00000000000004569821
[3]   0.000000000000000000128754
 
Calibrated voltage = -0.0001356X^0 + 0.00000000216530X^1 + 0.00000000000004569821X^2 + 0.000000000000000000128754X^3
 
where X =  measured voltage(a raw data sample)
 
When I use the method above my calibrated value will not reach the value of the sampled double.
raw data voltage = 4,9V
double voltage = 5,0
 
What am I doing wrong. Is my calculation with the scaling coefficients wrong.
 
Souza
0 Kudos
Message 3 of 4
(3,289 Views)

Hi,

Do you determine these scaling coefficients your self? i.e polynomial correction? or do you wish to read out the scaling information from the driver?

When you are measuring with a M Series and NI-DAQmx, and you read out the Voltage these are already corrected with the internal calibration coefficients.

If you wish to use your own calibration coefficients i would advice to use a polynomial Scale. You can creat such a scale in MAX and configure your task to use this scale and all corrections are done by DAQmx.

Hope this helps.

Regards,

Karsten

0 Kudos
Message 4 of 4
(3,241 Views)