The way the reader scales the data is to read the binary data (as I16s) from the data file. This 2d array drives a FOR loop that executes once for each column of data. (As a side note, if I had written this routine I would have transposed the array to turn the columns into rows and then just let the loop auto-index the array--the logic to me would seem a little clearer. In any case...)
Inside the loop each column is processed slightly differently depending on whether it's the data is unipolar (positive only) or bipolar. The result is that the I16 integer array is turned into a SGL floating-point array.
These values are then multiplied by a "multiplier" value (which could be your "(voltage range/2^(number of bits-1)"--though not necessarily)and added to
an "offset" value--straight-forward Mx + B scaling...
Mike...