Scaling and Normalization of Binary Data

NI High-Speed Digitizers Help (NI-SCOPE)

Edition Date: January 2017

Part Number: 370592AB-01

View Product Info

DOWNLOAD (Windows Only)


NI-SCOPE (English | Japanese)

In a normal acquisition, you cannot assume that the binary data maps perfectly to the vertical range. For example, if you fetch 16-bit binary data, you might expect that the positive full scale binary value corresponds to the maximum positive voltage of the vertical range, and that the negative full scale binary value corresponds to the maximum negative voltage. This is not the case, however, for a number of reasons.

First, the full scale of the ADC is not mapped to the vertical range. A few codes on the positive and negative ends are left as headroom, in case the input signal slightly exceeds the specified vertical range. Second, the binary values do not account for the required corrections to gain and offset based on calibration data. If you fetch binary data, you can convert to voltage values using the gain and offset values from the wfmInfo struct or use the niScope Get Scaling Coefficients VI or the niScope_GetScalingCoefficients function to get these coefficients. These values account for the ADC normalization and calibration data.

Voltage = (Binary Value × Gain) + Offset

To get binary data that accounts for both ADC normalization and calibration, use the niScope Get Normalization Coefficients VI or the niScope_GetNormalizationCoefficients function. Applying gain and offset from the normalization coefficients results in a range of binary values that maps exactly to the vertical range you configure.

Normalized Binary Data = (Binary Value × Gain) + Offset

Voltage = Normalized Binary Data × (Range/2resolution in bits)

In a normal acquisition, you must know the gain and offset values to correctly convert the binary data to voltage values. After applying gain and offset values from the niScope Get Normalization Coefficients VI or the niScope_GetNormalizationCoefficients function, you can assume the following:

  • The maximum positive binary value maps to the maximum positive voltage of the vertical range.
  • The maximum negative binary value maps to the maximum negative voltage of the vertical range.
  • The vertical range is divided evenly across the possible binary values.

WAS THIS ARTICLE HELPFUL?

Not Helpful