High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

5922 Resolution problems

Sorry for such a long post, but I am trying to be as clear as possible.

 

I am using LabView 8.2.1 to control my 5922, but a couple of issues concerning the resolution are really bothering me.  I have attached a simple example code for you to look at.  Using the NI-Scope functions, I do a simple setup of the horizontal and vertical channels, trigger the device, and then do a simple read.

 

I used the following settings to measure a DC voltage input of 4 V:

Sample Rate = 15 MS/s (Note: this implies 16 bit resolution on the 5922)

Record Length = 1 (Yes, just one single sample)

Channel 0

Vertical Range = 10 V

 

Based on the range and sample rate, my resolution should be:

10 / 2^16 = 0.000 152 587 890 625

Or in reality, about 153 uV.  That means that the smallest change in signal amplitude that the digitizer can detect is 153 uV.

 

I set my waveform indicator to “Floating Point, 16 Digits of precision” (I know 16 digits is excessive, but I used it to make a point).

After applying 4 Vdc and running the vi, the digitizer/software returned:

3.999 314 591 713 998 7

 

Why are there so many digits?  How can a single acquisition of one sample on a 16 bit device yield so many decimal places?  Even at 24 bits I shouldn’t see any more than 596 nV!  Where do all these decimal places come from?

 

The follow-up question is how do I write code that displays the “correct” number of digits?  For a given voltage range and sample rate, how do I create an “indicator” that shows the correct resolution?

 

Thanks for your help!

0 Kudos
Message 1 of 5
(7,207 Views)
You are confusing the concepts of device resolution (16 bits) and format resolution (54 bits).  You start off with a 16-bit integer.  This number is copied to a DBL floating point representation, then scaled and offset to engineering units before being output.  The scale/offset operation produces all the extra non-zero digits.  It does not give you any more resolution.  You can make the display agree with your actual resolution by setting the format and precision, just like you did to show the 16 digits.

Another option is to fetch the data as a binary, unscaled number and apply any corrections yourself or simply display the unscaled binary representation.
Message 2 of 5
(7,200 Views)

Thanks for the reply, that makes sense.

I still do not know how to make the display agree with my actual resolution:  Suppose I sample a waveform and calculate a measurement (Vrms, for example).  I want to place an indicator on the front panel that will behave as follows:

If I am sampling at S1 on range R1, I want my indicator to display K1 digits.  If I am sampling at S2 on Range R2, I want my indicator to display K2 digits, etc.  My approach would be to use some sort of logic to determine how many bits of resolution I should have given S and R.  What I do not know how to do is (dynamically) change the way the indicator displays the number.  The only way I know how to change the indicator is by setting the format and precision, but that occurs outside of program execution.  I would like to have the indicator be able to "keep up with me", so to speak, as I change R and S.

Any help would be greatly appreciated.  Thanks!

0 Kudos
Message 3 of 5
(7,195 Views)
Hi Sjarago,

After setting your indicator to floating point (right-click on the indicator » properties » display format tab » select floating point), you can programmatically change the precision of the indicator through a property node.  Look below for a picture.



To create the property node: right-click on the indicator » create » property node » display format » precision.  Make sure that you make the property a write property (right-click on the property node and select "change all to write".   This will allow to input an integer for the precision of that indicator.

I hope this helps,
Paul C.

Message Edited by Paul C. on 08-23-2007 03:44 PM

0 Kudos
Message 4 of 5
(7,186 Views)
Adding to what Paul said, you will need to create a look-up table to set your resolutions based on acquisition speed.  Since you are interested in ranges, not exact acquisition frequencies, the case selector is the method of choice.  Use the case selector's range format to group similar resolutions.  For example, above 10MS/s, the resolution is 16 bits (about 5 digits).  The case selector would read "10000001.." for this case and the case itself would contain a single constant - a 5.  The low case is similar - "..500000" and an 8 for the number of digits.  An intermediate case has an actual range, for example "5000001..10000000" and 6 for the 5MS/s to 10MS/s range.  Note that the case selector input must be an integer - 32 bits is enough (this scope is not a GS/s scope Smiley Wink).  You will "miss" some theoretically valid values in the one point difference between the ranges, but in practice it will not matter, since the smallest actual frequency increment of this scope is about 40Hz.

If something is not clear of you have more questions, let us know.
0 Kudos
Message 5 of 5
(7,172 Views)