How Does The NI-Scope Fetch I16 VI Scale Digitizer Data?

Updated Jul 11, 2018

Reported In

Driver

  • NI-SCOPE

Issue Details

I have a 12-bit scope that I am reading in data from. When I use the niScope Get Wfm Coefficients VI in I16 mode I get a I16 value that seems to be a magnified or scaled version of the 12-bit ADC rather than the padded value I was expecting. How is the 12-bit data scaled to the I16 data type?

Solution

The information is contained in the Scaling and Normalization of Binary Data help topic.

Additional Information

To convert your signal by to the ADC of your device you will need to perform several steps.
  1. Obtain the Normalization Coefficients using the niScope Get Normalization Coefficients VI.
  2. Use the third formula in the Scaling and Normalization of Binary Data help document (Normalized Binary Data = (Binary Value × Gain)  Offset) to obtain a normalized array.
    • The normalized array has a max value that corresponds to the max value of the set vertical range and a min value that corresponds to the min value of the set vertical range, and the vertical range is divided evenly across the possible binary value. For example, using the niScope Fetch Binary 16.vi you capture a waveform that represents a 5V signal, and you have your scope set to a range of ±5V. Once you normalize your data, you can expect that your 5V signal will be represented by 32767, the max value in the I16 data type.
  3. Once you obtain a normalized array representing your data, you can multiply it by the ratio of 2 raised by the bitness of the scope ADC to 2 raised by the bitness of the data type. For example 2^12/2^16.
  4. You will now have a waveform that is represented by bits equal to the bitness of the scope ADC

WAS THIS ARTICLE HELPFUL?

Not Helpful