scottprahl / RigolWFM

Parsers for .wfm binary files created by a wide range of Rigol oscilloscopes
BSD 3-Clause "New" or "Revised" License
46 stars 6 forks source link

Rigol DS1102E wfm voltage levels not scaled in csv? #11

Closed stapelberg closed 4 years ago

stapelberg commented 4 years ago

Hey, thanks for maintaining this useful repository!

I installed RigolWFM 0.6.5 using pip.

After converting the attached door-open.wfm to CSV using wfmconvert E csv door-open.wfm, I noticed that the resulting voltage levels seem incorrect (2.88V instead of 28.8V):

$ head door-open.csv
X,CH 1,Start,Increment
ms, V,-3.000000e-02,5.000000e-05
-92.057200,2.88
-92.057000,2.88
-92.056800,2.88
-92.056600,2.88

Whereas with Rigol’s Ultrascope program on Windows, I see the expected voltage level of 28V DC, and the program displays the 10V/div setting I used when capturing: door-open-screen

I tried loading the file into kaitai, but couldn’t see anything obviously misinterpreted—maybe it’ll be apparent to you? :)

kaitai

Find door-open.wfm in door-open.zip and feel free to use it as a sample file.

scottprahl commented 4 years ago

Good catch! It turns out you have provided the first test file that uses a 10X probe. I checked in a fix, but I do not know if it is correct. The issue is whether the 10X probe affects both the scale and the offset or just the vertical scale. As implemented door-open.wfm now gives values around 28V.

Please git pull or insert this after line 210 in channel.py

self.volts *= self.probe_value

and test this fix with (with a 10X probe) for a couple of known offsets.

If the fix works then I will release a new version.

stapelberg commented 4 years ago

Thanks for the prompt fix. I hereby confirm that commit https://github.com/scottprahl/RigolWFM/commit/4dea20c94cccc164a1a8d770f1c580763b240e66 makes the voltage levels come out as expected! :)

scottprahl commented 4 years ago

Try out the new release. If it works, I will close this issue

stapelberg commented 4 years ago

Confirmed version 0.6.6 is working fine! Thanks for the new release