Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS1074Z Plus Logic analyzer channels are not recognized #25

Open
AlejandroBizzotto opened this issue Mar 24, 2022 · 4 comments
Open

DS1074Z Plus Logic analyzer channels are not recognized #25

AlejandroBizzotto opened this issue Mar 24, 2022 · 4 comments

Comments

@AlejandroBizzotto
Copy link

if I try just one LA channel I get a division by zero error:

python .\rigol_plt.py
Traceback (most recent call last):
File "C:\Users\jano\workfolder\code\memosens\rigol_plt.py", line 7, in
w = rigol.Wfm.from_file(filename, scope)
File "C:\Users\jano\AppData\Roaming\Python\Python310\site-packages\RigolWFM\wfm.py", line 209, in from_file
ch = RigolWFM.channel.Channel(w, ch_number, pname, selected)
File "C:\Users\jano\AppData\Roaming\Python\Python310\site-packages\RigolWFM\channel.py", line 162, in init
self.ds1000z(w, channel_number)
File "C:\Users\jano\AppData\Roaming\Python\Python310\site-packages\RigolWFM\channel.py", line 294, in ds1000z
self.points = w.header.points
File "C:\Users\jano\AppData\Roaming\Python\Python310\site-packages\RigolWFM\wfm1000z.py", line 274, in points
self._m_points = self.memory_depth // self.stride
ZeroDivisionError: integer division or modulo by zero

rigol_plt.py contains:

import matplotlib.pyplot as plt
import RigolWFM.wfm as rigol

filename = 'test1.wfm'
scope = 'DS1074Z'

w = rigol.Wfm.from_file(filename, scope)
w.plot()
plt.show()

if along with the LA I turn on CH1, the picture has blocks which are not correct:
image
If I zoom in:
image

the pictures in the scope:
test3
test31

I also tried wfmconver.exe, it stays forever doing nothing.
the files:
D.zip

firmware on the scope is 00.04.05.SP2, there is nothing newer than this one on Rigol's website.

@scottprahl
Copy link
Owner

Nice bug report. Unfortunately, the logic analyzer is completely undocumented and unsupported.

  1. The Logic Analyzer functions are not supported and have never been tested
  2. I didn't have a Z series test file with no channels enabled and therefore the division by zero never arose
  3. I just looked and I have no information about how the logic analyzer data is stored or interpreted. For example, I don't see any information in the header that indicates that digital channel 6 was used.

@AlejandroBizzotto
Copy link
Author

inside the attached D.zip file, test1.wfm has only digital 6 enabled, test3.wfm has digital 6 and analog 1. the digital content should be the same in both, the analog input was not connected (not even the probe).
I only have access to the scope at work (I have the same series oscilloscope at home, but without LA). If there is any other data I can gather to help analyzing this, please let me know.

@scottprahl
Copy link
Owner

I see. Thanks for clarification about what was saved.

The problem is that I do not know where in the file header to find any information about digital signals. Most specifically which signals have been saved.

The digital data is stored in 2 byte arrays. One for D7-D0 and the other for D15-D8. However, for example, test1.wfm has a bunch of 0x40 values (which is not 2^6 as one might expect for digital 6). So it is also not obvious how to interpret the bytes that are saved. If we could do that, then we could just discard all the arrays that are identically zeros as not having been saved.

You could help by using going to the kaitai struct IDE and adding wfm1000z.ksy along with the .wfm that you are interested in decoding. I don't have the time (or equipment) to reverse engineer this stuff.

Finally, you could also contact Rigol Technical Support and ask them to tell you how to interpret the MSO files.

@brainstorm
Copy link

brainstorm commented Jan 2, 2023

As you might have noticed on #27, I'm trying to figure out that WFM and your comment piked my interest:

The digital data is stored in 2 byte arrays. One for D7-D0 and the other for D15-D8. However, for example, test1.wfm has a bunch of 0x40 values (which is not 2^6 as one might expect for digital 6). So it is also not obvious how to interpret the bytes that are saved. If we could do that, then we could just discard all the arrays that are identically zeros as not having been saved.

Where did you see that? Here's what I see when I have all digital channels enabled (test0.wfm) and then all of them disabled except D0 and D1:

Screen Shot 2023-01-02 at 9 20 41 pm

Actual waveform data seems to be encoded later?

Screen Shot 2023-01-02 at 9 51 36 pm

Screen Shot 2023-01-02 at 9 24 29 pm

@scottprahl, I know your time is limited to dedicate to this particular reversing, but since you've seem a few of those, maybe you can identify patterns that you've seen before and therefore I can fully decode and put it together in Kaitai (as soon as I understand it)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants