I was using your scripts to transfer the data from scope (SDS2102X-Plus) into matlab. I works very well but I can see a slightly difference between the measured voltage amplitude at the scope and with the received data in matlab. The equation (also within the programmers guide of the scope) is as followed:
dataOut(i) = data(i)*(vDiv/25)-offs;
Im wondering about the 25. Why is there no dependency between resolution (8bit or 10bit) and vertical scaling (V/div)?
For example:
Im measuring at the scope an Pk-Pk voltage of a simple sine signal of 506mV. Resolution is 8 bit and the vertical resolution is 70mV/div and no offset.
If I load the data into matlab, my pk-pk voltage is at 604mV.
Do you have any idea, why there is such a difference? I think the equation would be better with something like:
dataOut(i) = data(i)*(vDiv * 8/2^8)-offs;
...for 8 bit. the reciprocal of 8/2^8 is 32 and not 25. but even then, i have not the same results as on the scope.
What are your experiences with that?