‎01-18-2012 06:52 AM
In our lab we have two DAQmx devices, the NI-PCIe-6363 and the NI-PCI-6733. Both have 16 bit precision for bipolar analog output. I understand that the smallest voltage difference that can be made is 2*Vref/2^16, where Vref is the AO reference voltage (10 Volts or externally supplied for the 6733, 10 or 5 Volts or externally supplied for the 6363).
I was wanting to know how the output voltage is quantised. The DAQmx functions take 64 bit floats as input, and at some point these must have their precision reduced. How is this rounding done, is it a floating point round to the nearest possible voltage, or is it always rounding down, or always rounding up?
What is the set of possible output voltages? Some diagrams in NI-DAQmx Help/Measurement Fundamentals/Signals/Analog/Sampling Considerations seem like they might imply that the maximum voltage +Vref is not quite attainable, so I'm guessing that the set of possible voltages is -Vref + 2*Vref*n/2^16, with n going from 0 to 2^16-1 inclusive. This includes -Vref and zero but doesn't include +Vref.
Could I get confirmation on that, or be corrected if it's wrong?
Solved! Go to Solution.
‎01-19-2012 05:18 PM
Hi Chris,
I'm not sure if I am understanding your question correctly. the smalles voltage difference of the 6363 and the 6733 will be (2*10)/(2^16) = 305uV which a 64 bit float in DAQmx will have no trouble representing it in LabVIEW, therefore no rounding is occuring. The 64 bit float input should be more than enough to represent unless you start moving into the ~24 bit range. Let me know if this helps or if I need any clarification. Thanks!
‎01-19-2012 05:36 PM
Hi Aldo,
Thanks for your reply.
It's the reverse problem I'm interested in. Whilst a 64 bit float is more than enough to represent a 16 bit number, the reverse is not true. I would like to know - when I give the DAQmx analog output functions a voltage as a 64 bit float, what 16 bit number does this round to, and what voltage does that correspond to?
So say I ask for zero volts as a float. Presumably the set of possible output voltages includes zero, so the device would output zero. But what if I ask for 300uV? Will the rounding happen upward, making the output 305uV? Or downward to zero?
Are the endpoints of the voltage range included? If I ask for 10 volts, will I get 10 volts, or will the output be less by 305uV?
‎01-19-2012 10:09 PM
Hi Chris,
The scaled version of DAQmx Write performs double precision floating scaling and then it does a round-to-nearest to convert the resulting DAC code from double to int16_t (or uint16_t for unipolar devices). The floating point scaling includes the AO custom scale if you have configured one, the conversion from volts or amps to DAC codes, and for some devices, calibration scaling.
You can inspect the scaling coefficients using the AO.DevScalingCoeff property. This takes V/A -> DAC codes and calibration scaling into account, but not AO custom scales.
X Series devices like the PCIe-6363 perform calibration scaling in software. The internal AO reference is slightly higher than 10 V, so that correcting for gain and offset errors does not limit the output range. This also means you are not limited to 9.9997 V on this device when using the internal reference.
The PCI-6733 uses calibration DACs instead of software scaling. Raw -32768 translates to -10 V, 0 translates to 0 V, 32768 is impossible due to 16-bit two's complement, and 32767 translates to 9.9997 V. When you pass 10 V to DAQmx Write with this device, DAQmx coerces it to 9.9997 V.
Note that for both of these devices, the absolute accuracy at full scale includes more than 305 uV of error. Consult the AO absolute accuracy tables in the device specifications for the full story.
Brad
‎01-19-2012 10:20 PM
Thanks Brad, that's exactly what I was after.