Posted Fri, 08 Sep 2023 06:43:22 GMT by Perez, John Philip
As per datasheet of 5/6 Series MSO instruments, "the value of YOFF is always 0.0" and "the value returned is always 0.0 as the offset is combined the :YZEro value". So in this case how do we differentiate yoff and yzero values in converting waveform data from the instrument into numerical data?
Calculations from datasheet : Yn = YZEro + YMULt(Yn - YOFf) , having the conditions stated above, this calculation will produce an incorrect results for these kind of oscilloscope series. 
Other version of Oscilloscope can use the equation without problem since YOFF and YZERO are not incorporated with each other.
Is their a workaround with this issue in the 5/6 MSO Series?
More detailed info on the attached file.
 
Posted Fri, 08 Sep 2023 23:10:05 GMT by Teles, Afonso
Hi John,

I use Y'n = Yn*Ymult + Yzero in my scripts and it works as intended.
I've attached said script for your convenience. Line 73 has the relevant math.
Posted Mon, 11 Sep 2023 00:54:05 GMT by Perez, John Philip
Hi Afonso,
Thank you.

The same plot/measurement I've got as before when I use your calculation. I think your preparation codes before capturing are the same as mine and I think somewhere in the codes differ also. If you dont mind me asking what is the inside of "query_binary_values" in Line67 have?. I think there is somewhere in our codes that is different from yours. 

Also, at command "DATa:ENCdg", we are using "RPB" in all our data capturing command while yours is "SRI", apparently when using "SRI" and "RIB" we can get correct measurement. Other selection like the "RPB" and others have given me incorrect measurements(the same as the picture in my first inquiry message). Can you please give us a brief description on these modes?

To confirm, I am using MSO54B 5-BW-500.
Posted Mon, 11 Sep 2023 21:45:15 GMT by Teles, Afonso
Hi John,

query_binary_values() is a standard pyvisa function: https://pyvisa.readthedocs.io/en/latest/api/resources.html#pyvisa.resources.MessageBasedResource.query_binary_values

The encodings are explained on page 2-445 of the programmer's manual.
Indeed using RPB (positive integer) instead of SRI (swapped signed integer) would explain the issue you're seeing as one represents the waveform data as an unsigned integer and the other as a signed integer, leading to the shifting you're seeing.
Posted Tue, 12 Sep 2023 00:01:50 GMT by Perez, John Philip
Thank you very much for the information Afonso. It helps solve the issues at hand. Greatly appreciated! :)

You must be signed in to post in this forum.