Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change the resolution of ADC from 16 bits to 12 bits?

Solved!
Go to solution

Thank you so much!

I was able to convert the data (raw data) to 12 bit by using logical shift. But I am not getting expected output. I am not sure if this is related to logical shift or something else.

I set the input range as 3.3 V (max) and 0V (min), with terminal configuration as RSE. I am giving 3.3V input to a1 channel.

When I am selecting the polymorphic selector for DAQmxRead as "Analog 1D DBL 1Chan NSamp", I receive the output as 3.3V as expected (please refer to "analog.png" image). But since I need raw data, I change the polymorphic selector to "Raw 1D U16". And when I change it to raw data, I get 1V equivalent values as shown in both the waveforms (in front panel) for 16 bit and 12 bit (please refer to raw data.png image).

In "12 bit" waveform, instead of getting output at ~1200, I should get the values as 4096 and in "16 bit" waveform, instead of ~20000, I should get the output at 65536, since I am giving 3.3 V, which is max. Can someone please help? I feel like I am doing a stupid mistake here. I have attached my project too (you might have to download both vi...not sure how they are related but one won't open without another). Thanks! 

Download All
0 Kudos
Message 11 of 13
(1,136 Views)

@Santhosh, I didn't get why you are multiplying 0 with 12 bit ADC equivalent...it's giving me 0 result.

0 Kudos
Message 12 of 13
(1,132 Views)

A more general answer:

You use a 621x device , so look into some specs

https://www.ni.com/pdf/manuals/371931f.pdf

 

depending on gain and individual calibration you get different V per LSB. (ususally different to <nominal range>/16^2 !)

 

Now you want to emulate your MCU ... 12bit resolution ADC ... but referenced to what?

However you end up in another V/LSB

 

So if you just want to stick in the 'analog' value world you can use something like this:

round2nearest.png

input is your higher resolution value (U in Volt), multiple the resolution of your ADC in V/LSB, result the new stepped values

hint: input and result can also be arrays 😉

 

If you want work with integer values, please define the representations 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 13 of 13
(1,123 Views)