LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb-9211voltage measurement resolution

How do I control the format of data from a USB-9211 being written to a file?
 
I am using a USB-9211 for measuring a voltage that ranges from -20mV to +20mV. When I write the data to an lvm file (using an express VI) it is less resolution than what I expected - it seems to be truncated to 6 decimal places.  I have experimented with different instances of the DAQmx Create and Read VI's and available settings for this device but I am not having any luck. The digital display of a waveform chart can be formatted to diplay more than 6 decimal places.
 
Sidebar questions:
What is the theoretical voltage resolution of the 9211? (160mV/2^24~10nV)
How does limiting the range of the device to less than full scale affect the measurement?
0 Kudos
Message 1 of 5
(2,887 Views)
Hi cascadejm,

LabVIEW saves data with up to six digits of precision in a text-based .lvm file, but higher precision can be achieved when using a .tdm binary measurement file.

The 9211 has 24 bits of resolution.  If you limit the range of the device to less than full scale using the Min and Max inputs of the Create Channel VI, it will not affect the resolution.  The device will take in the smaller measurement, apply gain to amplify it to the full range of the card thus taking advantage of the device's resolution.  Then in software, the voltage will be decreased back down to your original measurement values.

I hope this helps!
- Erik

Message Edited by Erik J on 12-04-2006 02:24 PM

0 Kudos
Message 2 of 5
(2,873 Views)
If you want to use the LVM file, you have a couple of options.

  1. The easiest thing to do is to save that data as the raw integer values, along with the scale and offset values.  You will probably need to change your acquisition code to read raw integers instead of scaled values.  This will result in no precision loss.
  2. Alternately, you can change the resolution yourself.  Note that this procedure will permanently change the resolution in the Express VI and will be overwritten if you reinstall LV.  Navigate to your <LabVIEW>/vi.lib/express/express output/EXFileWriteBlock.llb and open ex_CreateSignalChunkString.vi.  Open the VI and change the default behavior to create the formatting you want by changing the default behavior of the format input.  To prevent the permanent change in your vi.lib, drop a copy of the express VI, convert it to a normal VI, then save that VI and all its decendents to another directory.  Do your modifications on that code and call it from your program.
I would recommend option 1.  Or you can use TDMS or HWS, both of which are binary and will not lose resolution.  If you use TDM, make sure you use the binary form.  The ASCII form (the default) will have the same sort of resolution issues.
0 Kudos
Message 3 of 5
(2,868 Views)
Thanks for the help - I did not realize the lvm format does not support more significant digits.
0 Kudos
Message 4 of 5
(2,846 Views)
You're welcome, have a great day! Smiley Very Happy

- Erik
0 Kudos
Message 5 of 5
(2,841 Views)