08-09-2010 02:19 PM
Hi,
I have a question related to Ni 9263 which is a DAC module (analog output module). I am working on DNL/INL error of 12 bit ADC and I want to to increase NI9263 analog output voltage of DAC 1 LSB by 1 LSB (of DAC). However, DAC takes input as analog voltage. Hence, it is very hard to increment output by 1 LSB even if I know the Vref of Ni9263. Since it uses 16 bit DAC which results in an easy change in 1 LSB voltage if Vref changes a little. So I want to apply digital code rather than dealing with analog voltage which I can read later with another ADC(Ni 9205) or a DMM.
Do you have any suggestions how to do this?
Thanks,
Ouz
NSC Intern
Solved! Go to Solution.
08-09-2010 03:50 PM
Hi Ouz,
Are you using DAQmx? If so, click on the DAQmx Write VI's polymorphic VI selector and choose Analog >> Unscaled >> 2D I16. Note that DAQmx does not apply the NI 9263's calibration constants with this version of the write VI. You could use the AO.DevScalingCoeff property in the DAQmx Channel property node to calculate the calibrated voltage based on the unscaled value, but measuring the output with another device makes this a non-issue.
Brad
08-09-2010 05:35 PM
Hi Brad,
Thanks for your response. Using Unscaled 2D I16 works for my purpose. Let me try to use AO.DevScalingCoeff property also even if I need to read the output with a DMM.
Regards,
Ouz
08-09-2010 05:44 PM
Hi Brad,
Could you explain a little bit how to use two values returning from AO.DevScalingCoeff to calculate the analog output?
Thanks,
Ouz
08-09-2010 06:30 PM
Hi Ouz,
The array returned from that property contains coefficients for converting voltages to binary DAC codes:
binary = coeff[0] + coeff[1] * voltage + coeff[2] * voltage^2 + coeff[3] * voltage^3 + ...
(By '^' I mean exponentiation, not xor.)
To convert binary DAC codes back to voltages, you need to invert the polynomial. DAQmx includes a helper VI that uses curve fitting to do this in the general case (DAQmx Compute Reverse Polynomial Coefficients.vi) but it isn't necessary here. The NI 9263's scaling polynomial has a degree of 1, so the inverse is easy to compute:
voltage = (binary - coeff[0]) / coeff[1]
Brad
08-09-2010 07:38 PM
Hi Brad,
Thanks for the help.
Have a good one.
Ouz