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

DS1102 #23

Closed svpcom closed 2 years ago

svpcom commented 2 years ago

Ubuntu 18.04, python3.6, use trunk https://github.com/scottprahl/RigolWFM.git Osciloscope: DS1102E Signals: DS1102E-signals.zip

test file:

$ cat test.py 
import sys
import RigolWFM.wfm as rigol
model = "DS1102E"
filename = sys.argv[1]
scope_data = rigol.Wfm.from_file(filename, model)
description = scope_data.describe()
print(description)

Got error:

Traceback (most recent call last):
  File "./test.py", line 5, in <module>
    scope_data = rigol.Wfm.from_file(filename, model)
  File "/tmp/rigol/lib/python3.6/site-packages/RigolWFM/wfm.py", line 206, in from_file
    ch = RigolWFM.channel.Channel(w, ch_number, pname, selected)
  File "/tmp/rigol/lib/python3.6/site-packages/RigolWFM/channel.py", line 113, in __init__
    self.seconds_per_point = w.header.seconds_per_point
  File "/tmp/rigol/lib/python3.6/site-packages/RigolWFM/wfm1000e.py", line 380, in header
    self._m_header = Wfm1000e.Header(self._io, self, self._root)
  File "/tmp/rigol/lib/python3.6/site-packages/RigolWFM/wfm1000e.py", line 202, in __init__
    self._read()
  File "/tmp/rigol/lib/python3.6/site-packages/RigolWFM/wfm1000e.py", line 210, in _read
    raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", self.blank_12, self._io, u"/types/header/seq/1")
kaitaistruct.ValidationNotEqualError: /types/header/seq/1: at pos 16: validation failed: not equal, expected b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', but got b'~\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

If I swith type to DS1102D it works, but shows invalid amplitude scale. Pulse voltage should be 3V

scottprahl commented 2 years ago

Fixed. Try out v0.9.3. Thanks for the bug report.

svpcom commented 2 years ago

All works. Thanks!